mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
JS: Rename to upward navigation
This commit is contained in:
@@ -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() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user