Преглед изворни кода

fix the cookies removal on disconnection

Olivier Massot пре 5 година
родитељ
комит
4eb72eadc7
1 измењених фајлова са 2 додато и 2 уклоњено
  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();