Disallow "." as HTTP host.
GitOrigin-RevId: d8f5d746f021167d2752a5c3fd67486966fb47d6
This commit is contained in:
parent
c7fff4539f
commit
6301dd65d7
@ -95,6 +95,9 @@ Result<HttpUrl> parse_url(MutableSlice url, HttpUrl::Protocol default_protocol)
|
|||||||
if (host.empty()) {
|
if (host.empty()) {
|
||||||
return Status::Error("URL host is empty");
|
return Status::Error("URL host is empty");
|
||||||
}
|
}
|
||||||
|
if (host == ".") {
|
||||||
|
return Status::Error("Host is invalid");
|
||||||
|
}
|
||||||
|
|
||||||
int specified_port = port;
|
int specified_port = port;
|
||||||
if (port == 0) {
|
if (port == 0) {
|
||||||
|
Reference in New Issue
Block a user