File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
java/ql/src/experimental/Security/CWE/CWE-522 Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -72,13 +72,7 @@ class URIConstructor extends ClassInstanceExpr {
72
72
* Gets a regular expression for matching private hosts.
73
73
*/
74
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\\](/.*)?"
75
+ 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
76
}
83
77
84
78
/**
You can’t perform that action at this time.
0 commit comments