- Jul 04, 2016
-
-
Jaime Pérez authored
Related to previous commits. The SimpleSAML_Session::updateSessionCookies() updates both the session cookie and the auth token. For the latter, it uses the setCookie() method from the session handler, while it should use the SimpleSAML\Utils\HTTP::setCookie() method instead.
-
- Jul 02, 2016
-
-
Jaime Pérez authored
Historically, SimpleSAML_SessionHandler::newSessionId() has also created the session, sending the cookies to the browser. This is problematic both because given the name of the method one would not assume such behaviour, and also because even for transient sessions the handler would then try to set cookies. When we are using a transient session, it is likely to be because we cannot set cookies or because there was a temporary error when loading the session. If we try to set the cookies even for transient sessions, we could either get an error because cookies cannot be set, or overwrite the previous session cookies with transient ones, trashing a legitimate session in case a temporary error occurs. As a side effect, this can also cause behaviours like the one described in issue #413. There's no point in trying to set the cookies when it's not possible, so we shouldn't even try, and save us the errors. To fix this, we made SimpleSAML_SessionHandler::setCookie() abstract, forcing each extending class to implement it. The former implementation is moved to SimpleSAML_SessionHandlerCookie, and the SimpleSAML_SessionHandlerPHP gets a new method that starts the session, effectively sending the cookie. SimpleSAML_Session would then be responsible to call the setCookie() method of the session handler when creating a regular session, and skip it when creating a transient one. This introduces a bug, since SimpleSAML_Session was trying to set the auth token cookie calling the same setCookie() method in the session handler. We fixed that by using SimpleSAML\Utils\HTTP::setCookie() instead, in 8756835b. This resolves #413.
-
Jaime Pérez authored
If we just called isset() on SimpleSAML_Session::$instance, and it returned false as we continued execution, it makes no sense to get the "previous" instance since it will always be null. We can just check that $instance is not null later.
-
Jaime Pérez authored
This way we can pass an exception that made us use transient sessions, and get the method to throw that exception after getting the transient session.
-
Jaime Pérez authored
SimpleSAML_Session should set the auth token using the SimpleSAML\Utils\HTTP::setCookie(), instead of the setCookie() method provided by session handlers. The SimpleSAML_SessionHandler::setCookie() method should be used only to set the session cookie, not random cookies. If we want cookies to have the same parameters as session cookies, we can always get the session parameters calling SimpleSAML_SessionHandler::getSessionParams() and pass them to SimpleSAML\Utils\HTTP::setCookie().
-
- Apr 07, 2016
-
-
Jaime Perez Crespo authored
Add a method to SimpleSAMLphp_SessionHandlerPHP to restore a session existing previously to our own session. This can be used in SimpleSAML_Session to restore the PHP session status previous to calling our API, while also guaranteeing that our session is correctly saved. The documentation has been updated to reflect this and recommend how to deal with conflicting PHP sessions. This closes #244 and resolves #349.
-
- Mar 31, 2016
-
-
Jaime Perez Crespo authored
-
- Mar 09, 2016
-
-
Jaime Perez Crespo authored
-
- Oct 27, 2015
-
-
Jaime Perez Crespo authored
Prevent the SimpleSAML_Logger class from creating loops while trying to get the track ID from the session. It must now be set manually by calling SimpleSAML_Logger::setTrackID(). Also allow SimpleSAML_Memcache to differentiate between a key not found in memcache and a request to memcache failed. If all servers are down, an exception is thrown and the user informed about the internal error. This hopefully resolves #264.
-
- Oct 21, 2015
-
-
Jaime Perez Crespo authored
Bugfix: if there's no session, getCookieSessionId() cannot return a session identifier, therefore there's no session we can return. This resolves #256.
-
- Oct 14, 2015
-
-
Jaime Perez Crespo authored
-
- Aug 05, 2015
-
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
- Apr 20, 2015
-
-
Jaime Perez Crespo authored
-
- Apr 16, 2015
-
-
Jaime Perez Crespo authored
Move SimpleSAML_Utilities::generateID() to SimpleSAML_Utils_Random::generateID(). Deprecate the former and schedule it for removal in 2.0.
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
- Jan 20, 2015
-
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
Stop calling SimpleSAML_Session::getAttributes() in SimpleSAML_Error_Error class. Use an alternate way to try to fetch user's mail.
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
Remove error handling code when session fails to initialise in SimpleSAML_Session::getSessionFromRequest().
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
Remove DATA_TIMEOUT_LOGOUT and expireDataLogout() from SimpleSAML_Session. Now, if we want to store data in the session that needs to go away when logging out, we should do that manually on every logout.
-
- Jan 19, 2015
-
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
-