summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaime Pérez <jaime.perez@uninett.no>2016-08-15 10:39:47 +0200
committerJaime Pérez <jaime.perez@uninett.no>2016-08-15 10:39:47 +0200
commit0bd93f6f4d2d37b6f362997f64236871026252ac (patch)
tree997c2838d9281567b75a365be7f61c0b024d9f1a
parent6c3d49f97b97ca9d7c182fecfd6e4d5d73e9b7d1 (diff)
downloadsimplesamlphp-0bd93f6f4d2d37b6f362997f64236871026252ac.zip
simplesamlphp-0bd93f6f4d2d37b6f362997f64236871026252ac.tar.gz
simplesamlphp-0bd93f6f4d2d37b6f362997f64236871026252ac.tar.bz2
bugfix: Fix a bug in AuthMemCookie that prevented the cookie from being set.
This was due to incorrect use of the SimpleSAML_SessionHandler::setCookie() method to set the cookie, instead of SimpleSAML\Utils\HTTP::setCookie().
-rw-r--r--lib/SimpleSAML/AuthMemCookie.php3
-rw-r--r--www/authmemcookie.php5
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/SimpleSAML/AuthMemCookie.php b/lib/SimpleSAML/AuthMemCookie.php
index ab69515..ef8a077 100644
--- a/lib/SimpleSAML/AuthMemCookie.php
+++ b/lib/SimpleSAML/AuthMemCookie.php
@@ -145,8 +145,7 @@ class SimpleSAML_AuthMemCookie
$memcache->delete($sessionID);
// delete the session cookie
- $sessionHandler = SimpleSAML_SessionHandler::getSessionHandler();
- $sessionHandler->setCookie($cookieName, null);
+ \SimpleSAML\Utils\HTTP::setCookie($cookieName, null);
}
diff --git a/www/authmemcookie.php b/www/authmemcookie.php
index 77379f6..a24b055 100644
--- a/www/authmemcookie.php
+++ b/www/authmemcookie.php
@@ -34,11 +34,8 @@ try {
// generate session id and save it in a cookie
$sessionID = SimpleSAML\Utils\Random::generateID();
-
$cookieName = $amc->getCookieName();
-
- $sessionHandler = SimpleSAML_SessionHandler::getSessionHandler();
- $sessionHandler->setCookie($cookieName, $sessionID);
+ \SimpleSAML\Utils\HTTP::setCookie($cookieName, $sessionID);
// generate the authentication information
$attributes = $s->getAttributes();