Another change to the baseurl check

pull/304/merge
iglocska 2014-10-02 11:06:08 +02:00
parent 0e2d8e9a55
commit 06ef98af40
1 changed files with 1 additions and 1 deletions

View File

@ -917,7 +917,7 @@ class Server extends AppModel {
public function testBaseURL($value) {
if ($this->testForEmpty($value) !== true) return $this->testForEmpty($value);
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) === true ? 'HTTPS' : 'HTTP';
if ($value != strtolower($protocol) . '://' . $_SERVER[$protocol . '_HOST']) return false;
if ($value != strtolower($protocol) . '://' . $_SERVER['HTTP_HOST']) return false;
return true;
}