Skip to content

Commit b7e5227

Browse files
smehta23smowtonaschackmull
authored
Apply suggestions from code review
Co-authored-by: Chris Smowton <smowton@github.com> Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
1 parent a697063 commit b7e5227

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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)