Fix to PolynomialRedos not finding results and to test cases not finding that

This commit is contained in:
Joe Farebrother
2022-02-16 16:31:50 +00:00
parent 91887ab229
commit 5143585080
4 changed files with 44 additions and 27 deletions

View File

@@ -24,11 +24,11 @@ class PolynomialRedosSink extends DataFlow::Node {
PolynomialRedosSink() { regexMatchedAgainst(reg.getRegex(), this.asExpr()) }
RegExpTerm getRegExp() { result = reg }
RegExpTerm getRegExp() { result.getParent() = reg }
}
class PolynomialRedosConfig extends TaintTracking::Configuration {
PolynomialRedosConfig() { this = "PolynomialRodisConfig" }
PolynomialRedosConfig() { this = "PolynomialRedosConfig" }
override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource }