diff options
author | Jaime Pérez <jaime.perez@uninett.no> | 2016-07-26 17:11:56 +0200 |
---|---|---|
committer | Jaime Pérez <jaime.perez@uninett.no> | 2016-07-26 17:11:56 +0200 |
commit | a5ca1aa33a441c0304cfc2a71655f4d72c7b2135 (patch) | |
tree | aa1ff53af2ef68b4a31cb4835994d5e16d6a6c1c /modules | |
parent | 2c3146da9b1991ea40b288b5f6c3b9beeed90e0d (diff) | |
download | simplesamlphp-a5ca1aa33a441c0304cfc2a71655f4d72c7b2135.zip simplesamlphp-a5ca1aa33a441c0304cfc2a71655f4d72c7b2135.tar.gz simplesamlphp-a5ca1aa33a441c0304cfc2a71655f4d72c7b2135.tar.bz2 |
Stop using SimpleSAML_Configuration::getBaseURL().
Use the recently added SimpleSAML_Configuration::getBasePath() instead. It guarantees the path prepended with a slash, so no need to do that every time when calling the method. As a side effect, we get rid of buggy invocations (calling getBaseUrl() instead of getBaseURL()), and also of old-style convention for the 'baseurlpath' configuration option, allowing a star at the beginning.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/core/www/cleardiscochoices.php | 2 | ||||
-rw-r--r-- | modules/multiauth/lib/Auth/Source/MultiAuth.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/core/www/cleardiscochoices.php b/modules/core/www/cleardiscochoices.php index a5616d8..3628a45 100644 --- a/modules/core/www/cleardiscochoices.php +++ b/modules/core/www/cleardiscochoices.php @@ -8,7 +8,7 @@ require_once('_include.php'); // The base path for cookies. This should be the installation directory for SimpleSAMLphp. $config = SimpleSAML_Configuration::getInstance(); -$cookiePath = '/' . $config->getBaseUrl(); +$cookiePath = $config->getBasePath(); // We delete all cookies which starts with 'idpdisco_' foreach($_COOKIE as $cookieName => $value) { diff --git a/modules/multiauth/lib/Auth/Source/MultiAuth.php b/modules/multiauth/lib/Auth/Source/MultiAuth.php index dc0a95e..f3acc90 100644 --- a/modules/multiauth/lib/Auth/Source/MultiAuth.php +++ b/modules/multiauth/lib/Auth/Source/MultiAuth.php @@ -204,7 +204,7 @@ class sspmod_multiauth_Auth_Source_MultiAuth extends SimpleSAML_Auth_Source { 'lifetime' => (60*60*24*90), /* The base path for cookies. This should be the installation directory for SimpleSAMLphp. */ - 'path' => ('/' . $config->getBaseUrl()), + 'path' => $config->getBasePath(), 'httponly' => FALSE, ); |