]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Fix login loop for private instances 1536/head
authorArthurHoaro <arthur@hoa.ro>
Tue, 1 Sep 2020 09:26:24 +0000 (11:26 +0200)
committerArthurHoaro <arthur@hoa.ro>
Tue, 1 Sep 2020 09:26:24 +0000 (11:26 +0200)
GET /login and POST /login have 2 distinct route name.

Fixes #1533

application/front/ShaarliMiddleware.php

index c015c0c6f0284fcfb9802a9938494c60763f721e..d1aa139989e2689ee61df29f47c2cd08bd2d9999 100644 (file)
@@ -94,7 +94,7 @@ class ShaarliMiddleware
             && $this->container->conf->get('privacy.force_login')
             // and the current page isn't already the login page
             // and the user is not requesting a feed (which would lead to a different content-type as expected)
-            && !in_array($next->getName(), ['login', 'atom', 'rss'], true)
+            && !in_array($next->getName(), ['login', 'processLogin', 'atom', 'rss'], true)
         ) {
             throw new UnauthorizedException();
         }