Project

General

Profile

Actions

Anomalie #1175

closed

Redirection when not logged in fail

Added by Johan Cwiklinski over 6 years ago. Updated over 6 years ago.

Status:
Fermé
Priority:
Normal
Category:
Core
Target version:
Start date:
05/01/2018
Due date:
% Done:

100%

Estimated time:
Version utilisée:

Description

When you try to open a restricted URL and you're not loggd in; Galette should redirect you to the login page, but currently it displays a blank page.

It looks like the "403" code passed is the cause:

diff --git a/galette/includes/main.inc.php b/galette/includes/main.inc.php
index de440045..e165de47 100644
--- a/galette/includes/main.inc.php
+++ b/galette/includes/main.inc.php
@@ -155,7 +155,6 @@ $authenticate = function ($request, $response, $next) use ($container) {
         );
         $this->flash->addMessage('error_detected', _T("Login required"));
         return $response
-            ->withStatus(403)
             ->withHeader('Location', $this->router->pathFor('slash'));
     } else {
         //check for ACLs

Actions

Also available in: Atom PDF