From 0e65924ea73b226cc3a63589f6869551b6491e3e Mon Sep 17 00:00:00 2001 From: Olivier Meunier Date: Wed, 27 Jun 2012 15:35:59 +0000 Subject: [PATCH] Fix: force_login is working again with the new auth plugin system --- src/common/include/pre.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/include/pre.php b/src/common/include/pre.php index 34bcf96ca1..dcae1c6db9 100644 --- a/src/common/include/pre.php +++ b/src/common/include/pre.php @@ -330,10 +330,12 @@ if (forge_get_config('database_name') != "") { // Mandatory login if (!session_loggedin() && forge_get_config ('force_login') == 1 ) { $expl_pathinfo = explode('/',getStringFromServer('REQUEST_URI')); - if (getStringFromServer('REQUEST_URI')!='/' && $expl_pathinfo[1]!='account' && $expl_pathinfo[1]!='export' ) exit_not_logged_in(); + if (getStringFromServer('REQUEST_URI')!='/' && $expl_pathinfo[1]!='account' && $expl_pathinfo[1]!='export' && $expl_pathinfo[1]!='plugins') exit_not_logged_in(); // Show proj* export even if not logged in when force login // If not default web project page would be broken if ($expl_pathinfo[1]=='export' && !preg_match('/^proj/', $expl_pathinfo[2])) exit_not_logged_in(); + // We must let auth plugins go further + if ($expl_pathinfo[1]=='plugins' && !preg_match('/^auth/', $expl_pathinfo[2])) exit_not_logged_in(); } // Insert this page view into the database -- 2.30.2