We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a1b98e commit 43ff3b1Copy full SHA for 43ff3b1
cpp/ql/src/Security/CWE/CWE-319/UseOfHttp.ql
@@ -35,8 +35,9 @@ class HttpStringLiteral extends StringLiteral {
35
exists(string s | this.getValue() = s |
36
s = "http"
37
or
38
- s.matches("http://%") and
39
- not s.substring(7, s.length()) instanceof PrivateHostName and
+ exists(string tail |
+ tail = s.regexpCapture("http://(.*)", 1) and not tail instanceof PrivateHostName
40
+ ) and
41
not TaintTracking::localExprTaint(any(StringLiteral p |
42
p.getValue() instanceof PrivateHostName
43
), this.getParent*())
0 commit comments