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 {
95
95
// PathTraversalSanitizer + allowListGuard
96
96
run {
97
97
val source: File ? = source() as File ?
98
- val normalized: String = source!! .getCanonicalPath()
98
+ val normalized: String = source!! .canonicalPath
99
99
if (normalized.startsWith(" /safe" )) {
100
100
sink(source) // Safe
101
101
sink(normalized) // Safe
@@ -106,7 +106,7 @@ class TestKt {
106
106
}
107
107
run {
108
108
val source: File ? = source() as File ?
109
- val normalized: String = source!! .getCanonicalFile() .toString()
109
+ val normalized: File = source!! .canonicalFile .toString()
110
110
if (normalized.startsWith(" /safe" )) {
111
111
sink(source) // Safe
112
112
sink(normalized) // Safe
@@ -328,7 +328,7 @@ class TestKt {
328
328
// PathTraversalSanitizer + blockListGuard
329
329
run {
330
330
val source: File ? = source() as File ?
331
- val normalized: String = source!! .getCanonicalPath()
331
+ val normalized: String = source!! .canonicalPath
332
332
if (! normalized.startsWith(" /data" )) {
333
333
sink(source) // Safe
334
334
sink(normalized) // Safe
@@ -339,7 +339,7 @@ class TestKt {
339
339
}
340
340
run {
341
341
val source: File ? = source() as File ?
342
- val normalized: String = source!! .getCanonicalFile() .toString()
342
+ val normalized: String = source!! .canonicalFile .toString()
343
343
if (! normalized.startsWith(" /data" )) {
344
344
sink(source) // Safe
345
345
sink(normalized) // Safe
You can’t perform that action at this time.
0 commit comments