Address PR comments.

This commit is contained in:
Sebastian Bauersfeld
2022-08-19 17:16:00 +07:00
parent f6d42bd3c6
commit 2ec3746861

View File

@@ -36,7 +36,7 @@ class ResponseSplittingConfig extends TaintTracking::Configuration {
ma.getMethod().hasQualifiedName("java.lang", "String", methodName) and ma.getMethod().hasQualifiedName("java.lang", "String", methodName) and
target = ma.getArgument(0) and target = ma.getArgument(0) and
( (
methodName = "replace" and target.getIntValue() = [10, 13] methodName = "replace" and target.getIntValue() = [10, 13] // 10 == "\n", 13 == "\r"
or or
methodName = "replaceAll" and methodName = "replaceAll" and
target.getStringValue().regexpMatch(".*([\n\r]|\\[\\^[^\\]\r\n]*\\]).*") target.getStringValue().regexpMatch(".*([\n\r]|\\[\\^[^\\]\r\n]*\\]).*")