Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff58abb commit b65a033Copy full SHA for b65a033
1 file changed
java/ql/src/experimental/Security/CWE/CWE-522/InsecureBasicAuth.ql
@@ -72,13 +72,7 @@ class URIConstructor extends ClassInstanceExpr {
72
* Gets a regular expression for matching private hosts.
73
*/
74
private string getPrivateHostRegex() {
75
- result = "(?i)localhost(/.*)?" or
76
- result = "127\\.0\\.0\\.1(/.*)?" or // IPv4 patterns
77
- result = "10(\\.[0-9]+){3}(/.*)?" or
78
- result = "172\\.16(\\.[0-9]+){2}(/.*)?" or
79
- result = "192.168(\\.[0-9]+){2}(/.*)?" or
80
- result = "\\[0:0:0:0:0:0:0:1\\](/.*)?" or // IPv6 patterns
81
- result = "\\[::1\\](/.*)?"
+ result = "(?i)localhost([:/].*)?|127\\.0\\.0\\.1([:/].*)?|10(\\.[0-9]+){3}([:/].*)?|172\\.16(\\.[0-9]+){2}([:/].*)?|192.168(\\.[0-9]+){2}([:/].*)?|\\[0:0:0:0:0:0:0:1\\]([:/].*)?|\\[::1\\]([:/].*)?"
82
}
83
84
/**
0 commit comments