Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e361c7

Browse files
committed
Python: Make PathCheck a BarrierGuard
1 parent f8dba85 commit 6e361c7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

python/ql/src/experimental/semmle/python/Concepts.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ module PathNormalization {
9494
* A data-flow node that checks validates a path, for instance checking that it exists
9595
* or that it is safe to access.
9696
*/
97-
class PathCheck extends DataFlow::Node {
97+
class PathCheck extends DataFlow::BarrierGuard {
9898
PathCheck::Range range;
9999

100100
PathCheck() { this = range }
101+
102+
override predicate checks(ControlFlowNode node, boolean branch) { range.checks(node, branch) }
101103
}
102104

103105
/** Provides a class for modeling new path normalization APIs. */
@@ -106,7 +108,7 @@ module PathCheck {
106108
* A data-flow node that checks validates a path, for instance checking that it exists
107109
* or that it is safe to access.
108110
*/
109-
abstract class Range extends DataFlow::Node { }
111+
abstract class Range extends DataFlow::BarrierGuard { }
110112
}
111113

112114
/**

0 commit comments

Comments
 (0)