浏览代码

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();