Ensure trailing slash if cookie path is detected automatically

Seems like IE (8, 9, ?) has problems w/o the trailing slash and additional directories on the server that start w/ the path.

refs #11187
This commit is contained in:
Eric Lippmann 2016-02-27 22:42:32 +01:00
parent 5f43ac8f26
commit 03d7f3a1f4
1 changed files with 3 additions and 3 deletions

View File

@ -185,9 +185,9 @@ class Cookie
if ($path === null) { if ($path === null) {
// The following call could be used as default for ConfigObject::get(), but we prevent unnecessary // The following call could be used as default for ConfigObject::get(), but we prevent unnecessary
// function calls here, if the path is set in the config // function calls here, if the path is set in the config
$path = Icinga::app()->getRequest()->getBaseUrl(); $path = Icinga::app()->getRequest()->getBaseUrl() . '/'; // Zend has rtrim($baseUrl, '/')
} }
return $path; $this->path = $path;
} }
return $this->path; return $this->path;
} }
@ -222,7 +222,7 @@ class Cookie
// function calls here, if the secure flag is set in the config // function calls here, if the secure flag is set in the config
$secure = Icinga::app()->getRequest()->isSecure(); $secure = Icinga::app()->getRequest()->isSecure();
} }
return $secure; $this->secure = $secure;
} }
return $this->secure; return $this->secure;
} }