more precise getChild for matching "../"

This commit is contained in:
Erik Krogh Kristensen
2020-04-14 10:24:08 +02:00
parent 7c5c9ea8ea
commit e47575ce5b

View File

@@ -285,7 +285,7 @@ module TaintedPath {
exists(RegExpSequence seq | seq = result |
seq.getChild(0).getConstantValue() = "." and
seq.getChild(1).getConstantValue() = "." and
seq.getAChild().getAMatchedString() = "/"
seq.getChild(2).getAMatchedString() = "/"
)
or
exists(RegExpGroup group | result = group | group.getChild(0) = getADotDotSlashMatcher())