Revision: 2016
Author: olavmrk
Date: Wed Dec  2 03:52:24 2009
Log: saml2/SSOService: Detect missing cookie.
http://code.google.com/p/simplesamlphp/source/detail?r=2016

Modified:
  /trunk/www/saml2/idp/SSOService.php

=======================================
--- /trunk/www/saml2/idp/SSOService.php Tue Nov 17 04:23:35 2009
+++ /trunk/www/saml2/idp/SSOService.php Wed Dec  2 03:52:24 2009
@@ -271,7 +271,18 @@
   * If the spentityid parameter is provided, we will fallback to a  
unsolited response to the SP.
   */
  } elseif(array_key_exists('spentityid', $_GET)) {
-
+
+       if (isset($_REQUEST['cookieTime'])) {
+               $cookieTime = (int)$_REQUEST['cookieTime'];
+               if ($cookieTime + 3 > time()) {
+                       /*
+                        * Less than three seconds has passed since we were
+                        * here the last time. Cookies are probably disabled.
+                        */
+                       
SimpleSAML_Utilities::checkCookie(SimpleSAML_Utilities::selfURL());
+               }
+       }
+
        /* Creating a request cache, even though there was no request, and 
adding  
the
         * information that is neccessary to be able to respond with an 
unsolited  
response
         */
@@ -342,6 +353,7 @@
                 */
                $sessionLostParams = array(
                        'spentityid' => $requestcache['Issuer'],
+                       'cookieTime' => time(),
                        );
                if (isset($requestcache['RelayState'])) {
                        $sessionLostParams['RelayState'] = 
$requestcache['RelayState'];

--

You received this message because you are subscribed to the Google Groups 
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simplesamlphp-commits?hl=en.


Reply via email to