diff --git a/dist/admin/html.open/lib/LSWebAdmin/Auth/CAuthorizer.php b/dist/admin/html.open/lib/LSWebAdmin/Auth/CAuthorizer.php index 30789489..be3cd833 100644 --- a/dist/admin/html.open/lib/LSWebAdmin/Auth/CAuthorizer.php +++ b/dist/admin/html.open/lib/LSWebAdmin/Auth/CAuthorizer.php @@ -127,6 +127,14 @@ private function getRequestHost() private function getRequestPort() { + $host = UIBase::GrabInput('server', 'HTTP_HOST'); + if ($host !== '' && ($pos = strpos($host, ':')) !== false) { + $port = substr($host, $pos + 1); + if (ctype_digit($port) && (int) $port > 0 && (int) $port <= 65535) { + return (int) $port; + } + } + $port = UIBase::GrabInput('server', 'SERVER_PORT', 'int'); return ($port > 0) ? $port : null; }