Java: Fix failing tests

This commit is contained in:
Joe Farebrother
2020-10-06 13:49:02 +01:00
parent ff6c5c219c
commit ca60f2cc18
2 changed files with 2 additions and 1 deletions

View File

@@ -457,7 +457,7 @@ private predicate unsafeEscape(MethodAccess ma) {
// Removing `<script>` tags using a string-replace method is
// unsafe if such a tag is embedded inside another one (e.g. `<scr<script>ipt>`).
exists(StringReplaceMethod m | ma.getMethod() = m |
ma.getArgument(0).(StringLiteral).getRepresentedString() = "<script>" and
ma.getArgument(0).(StringLiteral).getRepresentedString() = "(<script>)" and
ma.getArgument(1).(StringLiteral).getRepresentedString() = ""
)
}