Don't assume port 0 for X-Forwarded-Port

This commit is contained in:
Alex Bowers 2019-06-19 12:46:55 +01:00 committed by GitHub
parent eb4026b3f4
commit 23db9be884
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1037,7 +1037,7 @@ class Request
$pos = strrpos($host, ':');
}
if (false !== $pos) {
if (false !== $pos && !empty(substr($host, $pos + 1))) {
return (int) substr($host, $pos + 1);
}