JS: Rename to upward navigation

This commit is contained in:
Asger F
2019-10-25 13:07:07 +01:00
parent 5636d42c13
commit 7ed31baeea
3 changed files with 7 additions and 7 deletions

View File

@@ -38,12 +38,12 @@ abstract class FileSystemAccess extends DataFlow::Node {
DataFlow::Node getRootPathArgument() { none() }
/**
* Holds if this file system access will reject paths containing path traversal
* Holds if this file system access will reject paths containing upward navigation
* segments (`../`).
*
* `argument` should refer to the relevant path argument or root path argument.
*/
predicate isPathTraversalRejected(DataFlow::Node argument) { none() }
predicate isUpwardNavigationRejected(DataFlow::Node argument) { none() }
}
/**

View File

@@ -840,7 +840,7 @@ module Express {
result = this.(DataFlow::CallNode).getOptionArgument(1, "root")
}
override predicate isPathTraversalRejected(DataFlow::Node argument) {
override predicate isUpwardNavigationRejected(DataFlow::Node argument) {
argument = getAPathArgument()
}
}

View File

@@ -393,11 +393,11 @@ module TaintedPath {
}
/**
* A path argument to a file system access, which disallows path traversal.
* A path argument to a file system access, which disallows upward navigation.
*/
private class FsPathSinkWithoutPathTraversal extends FsPathSink {
FsPathSinkWithoutPathTraversal() {
fileSystemAccess.isPathTraversalRejected(this)
private class FsPathSinkWithoutUpwardNavigation extends FsPathSink {
FsPathSinkWithoutUpwardNavigation() {
fileSystemAccess.isUpwardNavigationRejected(this)
}
override DataFlow::FlowLabel getAFlowLabel() {