3.0 results in an ICAP segfault handling these URLs.
Newer releases do not segfault as easily, but still accept the invalid
URL and there may be other unknown side-effects.
Makes the URL parser present ERR_INVALID_URL for this edge case.
if (*t != '\0')
port = atoi(t);
}
+
+ // Bug 3183 sanity check: If scheme is present, host must be too.
+ if (protocol != PROTO_NONE && (host == NULL || *host == '\0')) {
+ debugs(23, DBG_IMPORTANT, "SECURITY WARNING: Missing hostname in URL '" << url << "'. see access.log for details.");
+ return NULL;
+ }
}
for (t = host; *t; t++)