Skip to content

Commit 94c9f53

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: share code with dotDotCheckGuard
1 parent f38e696 commit 94c9f53

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

java/ql/lib/semmle/code/java/security/PathSanitizer.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ private predicate dotDotCheckGuard(Guard g, Expr e, boolean branch) {
143143
// String strPath = path.toString();
144144
// if (!strPath.contains("..") && strPath.startsWith("/safe/dir"))
145145
// sink(path);
146-
branch = g.(PathTraversalGuard).getBranch() and
147-
localTaintFlowToPathGuard(e, g) and
146+
pathTraversalGuard(g, e, branch) and
148147
exists(Guard previousGuard |
149148
previousGuard.(AllowedPrefixGuard).controls(g.getBasicBlock(), true)
150149
or

0 commit comments

Comments
 (0)