$this->initBasePath($request);
try {
- if (!is_file($this->container->conf->getConfigFileExt())
+ if (
+ !is_file($this->container->conf->getConfigFileExt())
&& !in_array($next->getName(), ['displayInstall', 'saveInstall'], true)
) {
return $response->withRedirect($this->container->basePath . '/install');
*/
protected function checkOpenShaarli(Request $request, Response $response, callable $next): bool
{
- if (// if the user isn't logged in
+ if (
+// if the user isn't logged in
!$this->container->loginManager->isLoggedIn()
// and Shaarli doesn't have public content...
&& $this->container->conf->get('privacy.hide_public_links')
&& $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();
}