Change regex used in HostnameSanitizingPrefix

This commit is contained in:
Ed Minnix
2023-05-09 19:54:22 -04:00
parent 774baead60
commit 43966ebaeb

View File

@@ -79,10 +79,7 @@ private class HostnameSanitizingPrefix extends InterestingPrefix {
// the host or entity addressed: for example, anything containing `?` or `#`, or a slash that
// doesn't appear to be a protocol specifier (e.g. `http://` is not sanitizing), or specifically
// the string "/".
exists(
this.getStringValue()
.regexpFind(".*([?#]|[^?#:/\\\\][/\\\\]).*|[/\\\\][^/\\\\].*|^/$", 0, offset)
)
exists(this.getStringValue().regexpFind("([?#]|[^?#:/\\\\][/\\\\])|^/$", 0, offset))
}
override int getOffset() { result = offset }