]> git.mxchange.org Git - friendica.git/commitdiff
Skip session authentication for backend modules
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 25 Oct 2021 03:17:22 +0000 (23:17 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 25 Oct 2021 03:17:55 +0000 (23:17 -0400)
- This was causing errors accessing these modules with an existing session with 2fa enabled while anonymous calls were going through

src/App.php

index 5c85c9f26d46ad29a7260c44d117bee4676750fd..3ef9bdb4ed56e326865478fba2ecbee1ea80003b 100644 (file)
@@ -631,7 +631,9 @@ class App
                                Model\Profile::openWebAuthInit($token);
                        }
 
-                       $auth->withSession($this);
+                       if (!$this->mode->isBackend()) {
+                               $auth->withSession($this);
+                       }
 
                        if (empty($_SESSION['authenticated'])) {
                                header('X-Account-Management-Status: none');