Skip to content

Commit 7ed31ba

Browse files
committed
JS: Rename to upward navigation
1 parent 5636d42 commit 7ed31ba

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

javascript/ql/src/semmle/javascript/Concepts.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ abstract class FileSystemAccess extends DataFlow::Node {
3838
DataFlow::Node getRootPathArgument() { none() }
3939

4040
/**
41-
* Holds if this file system access will reject paths containing path traversal
41+
* Holds if this file system access will reject paths containing upward navigation
4242
* segments (`../`).
4343
*
4444
* `argument` should refer to the relevant path argument or root path argument.
4545
*/
46-
predicate isPathTraversalRejected(DataFlow::Node argument) { none() }
46+
predicate isUpwardNavigationRejected(DataFlow::Node argument) { none() }
4747
}
4848

4949
/**

javascript/ql/src/semmle/javascript/frameworks/Express.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ module Express {
840840
result = this.(DataFlow::CallNode).getOptionArgument(1, "root")
841841
}
842842

843-
override predicate isPathTraversalRejected(DataFlow::Node argument) {
843+
override predicate isUpwardNavigationRejected(DataFlow::Node argument) {
844844
argument = getAPathArgument()
845845
}
846846
}

javascript/ql/src/semmle/javascript/security/dataflow/TaintedPathCustomizations.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,11 @@ module TaintedPath {
393393
}
394394

395395
/**
396-
* A path argument to a file system access, which disallows path traversal.
396+
* A path argument to a file system access, which disallows upward navigation.
397397
*/
398-
private class FsPathSinkWithoutPathTraversal extends FsPathSink {
399-
FsPathSinkWithoutPathTraversal() {
400-
fileSystemAccess.isPathTraversalRejected(this)
398+
private class FsPathSinkWithoutUpwardNavigation extends FsPathSink {
399+
FsPathSinkWithoutUpwardNavigation() {
400+
fileSystemAccess.isUpwardNavigationRejected(this)
401401
}
402402

403403
override DataFlow::FlowLabel getAFlowLabel() {

0 commit comments

Comments
 (0)