Skip to content

Commit 4a7bfbe

Browse files
committed
Python: Use .matches instead of .indexOf() = 0
1 parent daa1b6f commit 4a7bfbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ql/src/semmle/python/web/django/Response.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class DjangoResponseContentXSSVulnerable extends DjangoResponseContent {
6565
or
6666
exists(StringValue s |
6767
cls.getContentTypeArg(call).pointsTo(s) and
68-
s.getText().indexOf("text/html") = 0
68+
s.getText().matches("text/html%")
6969
)
7070
}
7171
}

0 commit comments

Comments
 (0)