Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Example does not work with Passbolt 5 (from official Docker image) #4

@bmansvk

Description

@bmansvk

Fixed with following diff:

--- gpg_auth-old.php	2020-06-10 14:50:29.000000000 +0200
+++ gpg_auth.php	2025-05-22 14:41:17.544218694 +0200
@@ -188,7 +188,7 @@
         }

         $cookieHeader = $this->_getHeader($header, 'Set-Cookie');
-        preg_match_all('/CAKEPHP=([^;]*);/mi', $cookieHeader, $matches);
+        preg_match_all('/PHPSESSID=([^;]*);/mi', $cookieHeader, $matches);
         $this->sessionId = $matches[1][0];
     }

@@ -214,7 +214,7 @@

     public function getCookie(bool $addCsrfToken = false)
     {
-        $cookie = "CAKEPHP={$this->sessionId}; path=/; HttpOnly;";
+        $cookie = "PHPSESSID={$this->sessionId}; path=/; HttpOnly;";
         if ($addCsrfToken) {
             $cookie .= " csrfToken={$this->getCsrfToken()}";
         }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions