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 316117f commit 1a41688Copy full SHA for 1a41688
cpp/ql/src/Security/CWE/CWE-290/AuthenticationBypass.ql
@@ -31,9 +31,7 @@ predicate hardCodedAddressOrIP(StringLiteral txt) {
31
// Hard-coded ip addresses, such as 127.0.0.1
32
s.regexpMatch("\"[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+\"") or
33
// Hard-coded addresses such as www.mycompany.com
34
- s.matches("\"www.%\"") or
35
- s.matches("\"http:%\"") or
36
- s.matches("\"https:%\"") or
+ s.regexpMatch("\"(www\\.|http:|https:).*\"") or
37
s.regexpMatch("\".*\\.(" + concat(getATopLevelDomain(), "|") + ")\"")
38
)
39
}
0 commit comments