From: ArthurHoaro Date: Tue, 1 Sep 2020 09:26:24 +0000 (+0200) Subject: Fix login loop for private instances X-Git-Tag: v0.12.0-beta-1~29^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=14fcfb521341fd7619cab0301cef699cb42d2080;p=github%2Fshaarli%2FShaarli.git Fix login loop for private instances GET /login and POST /login have 2 distinct route name. Fixes #1533 --- diff --git a/application/front/ShaarliMiddleware.php b/application/front/ShaarliMiddleware.php index c015c0c6..d1aa1399 100644 --- a/application/front/ShaarliMiddleware.php +++ b/application/front/ShaarliMiddleware.php @@ -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(); }