Explorar o código

fix the cookies removal on disconnection

Olivier Massot %!s(int64=5) %!d(string=hai) anos
pai
achega
4eb72eadc7
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      ot_connect/Classes/Service/OtAuthenticationService.php

+ 2 - 2
ot_connect/Classes/Service/OtAuthenticationService.php

@@ -415,11 +415,11 @@ class OtAuthenticationService extends AbstractAuthenticationService
             // Unset the session cookies (SESSID and BEARER)
             if (isset($_COOKIE['BEARER'])) {
                 unset($_COOKIE['BEARER']);
-                setcookie('BEARER', null, -1, '/');
+                setcookie('BEARER', '', time() - 1, '/');
             }
             if (isset($_COOKIE['SFSESSID'])) {
-                setcookie('SFSESSID', null, -1, '/');
                 unset($_COOKIE['SFSESSID']);
+                setcookie('SFSESSID', '', time() - 1, '/');
             }
 
             $this->pObj->logoff();