C++: Address review comment.

This commit is contained in:
Geoffrey White
2021-11-11 09:07:40 +00:00
parent 9a1b98e1d9
commit 43ff3b1c80

View File

@@ -35,8 +35,9 @@ class HttpStringLiteral extends StringLiteral {
exists(string s | this.getValue() = s |
s = "http"
or
s.matches("http://%") and
not s.substring(7, s.length()) instanceof PrivateHostName and
exists(string tail |
tail = s.regexpCapture("http://(.*)", 1) and not tail instanceof PrivateHostName
) and
not TaintTracking::localExprTaint(any(StringLiteral p |
p.getValue() instanceof PrivateHostName
), this.getParent*())