patch upper-case acronyms to be PascalCase

This commit is contained in:
Erik Krogh Kristensen
2022-03-11 11:10:33 +01:00
parent e3a15792fa
commit 69353bb014
422 changed files with 3532 additions and 2244 deletions

View File

@@ -226,19 +226,19 @@ module PasswordHeuristics {
predicate isDummyAuthHeader(string header) {
isDummyPassword(header)
or
exists(string prefix, string suffix | prefix = getAnHTTPAuthenticationScheme() |
exists(string prefix, string suffix | prefix = getAnHttpAuthenticationScheme() |
header.toLowerCase() = prefix + " " + suffix and
isDummyPassword(suffix)
)
or
header.trim().toLowerCase() = getAnHTTPAuthenticationScheme()
header.trim().toLowerCase() = getAnHttpAuthenticationScheme()
}
/**
* Gets a HTTP authentication scheme normalized to lowercase.
* From this list: https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml
*/
private string getAnHTTPAuthenticationScheme() {
private string getAnHttpAuthenticationScheme() {
result =
[
"Basic", "Bearer", "Digest", "HOBA", "Mutual", "Negotiate", "OAuth", "SCRAM-SHA-1",