Update cpp/ql/src/Security/CWE/CWE-290/AuthenticationBypass.ql

Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
This commit is contained in:
Geoffrey White
2023-01-17 14:37:19 +00:00
committed by GitHub
parent 1a416884d4
commit d628cc5ab8

View File

@@ -32,7 +32,7 @@ predicate hardCodedAddressOrIP(StringLiteral txt) {
s.regexpMatch("\"[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+\"") or
// Hard-coded addresses such as www.mycompany.com
s.regexpMatch("\"(www\\.|http:|https:).*\"") or
s.regexpMatch("\".*\\.(" + concat(getATopLevelDomain(), "|") + ")\"")
s.regexpMatch("\".*\\.(" + strictconcat(getATopLevelDomain(), "|") + ")\"")
)
}