Skip to content

Commit aff1238

Browse files
committed
Obtain file for Truffle source in a secure manner
1 parent 64a65d3 commit aff1238

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/PythonLanguage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ public static Source newSource(PythonContext ctxt, String src, String name, bool
483483
SourceBuilder sourceBuilder = null;
484484
if (mayBeFile) {
485485
try {
486-
TruffleFile truffleFile = ctxt.getEnv().getInternalTruffleFile(name);
486+
TruffleFile truffleFile = ctxt.getPublicTruffleFileRelaxed(name, PythonLanguage.DEFAULT_PYTHON_EXTENSIONS);
487487
if (truffleFile.exists()) {
488488
// XXX: (tfel): We don't know if the expression has anything to do with the
489489
// filename that's given. We would really have to compare the entire

0 commit comments

Comments
 (0)