File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
java/ql/test/library-tests/pathsanitizer Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ class TestKt {
9595 // PathTraversalSanitizer + allowListGuard
9696 run {
9797 val source: File ? = source() as File ?
98- val normalized: String = source!! .getCanonicalPath()
98+ val normalized: String = source!! .canonicalPath
9999 if (normalized.startsWith(" /safe" )) {
100100 sink(source) // Safe
101101 sink(normalized) // Safe
@@ -106,7 +106,7 @@ class TestKt {
106106 }
107107 run {
108108 val source: File ? = source() as File ?
109- val normalized: String = source!! .getCanonicalFile() .toString()
109+ val normalized: File = source!! .canonicalFile .toString()
110110 if (normalized.startsWith(" /safe" )) {
111111 sink(source) // Safe
112112 sink(normalized) // Safe
@@ -328,7 +328,7 @@ class TestKt {
328328 // PathTraversalSanitizer + blockListGuard
329329 run {
330330 val source: File ? = source() as File ?
331- val normalized: String = source!! .getCanonicalPath()
331+ val normalized: String = source!! .canonicalPath
332332 if (! normalized.startsWith(" /data" )) {
333333 sink(source) // Safe
334334 sink(normalized) // Safe
@@ -339,7 +339,7 @@ class TestKt {
339339 }
340340 run {
341341 val source: File ? = source() as File ?
342- val normalized: String = source!! .getCanonicalFile() .toString()
342+ val normalized: String = source!! .canonicalFile .toString()
343343 if (! normalized.startsWith(" /data" )) {
344344 sink(source) // Safe
345345 sink(normalized) // Safe
You can’t perform that action at this time.
0 commit comments