Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b7e5227

Browse files
smehta23smowtonaschackmull
authored
Apply suggestions from code review
Co-authored-by: Chris Smowton <[email protected]> Co-authored-by: Anders Schack-Mulligen <[email protected]>
1 parent a697063 commit b7e5227

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

java/ql/src/Security/CWE/CWE-023/PartialPathTraversalGood.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import java.io.File;
2-
31
public class PartialPathTraversalGood {
42
public void example(File dir, File parent) throws IOException {
53
if (!dir.getCanonicalPath().toPath().startsWith(parent.getCanonicalPath().toPath())) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
category: minorAnalysis
2+
category: newQuery
33
---
44
* A new query `java/partial-path-traversal` finds partial path traversal vulnerabilities resulting from incorrectly using
5-
`String#startsWith` to compare canonical files.
5+
`String#startsWith` to compare canonical paths.

0 commit comments

Comments
 (0)