From 938c4df989af02c1260629479b7f03a1d3795a0a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 11 Oct 2011 21:34:50 +0200 Subject: [PATCH] Fixed route handling for ACP auth --- wcfsetup/install/files/lib/system/WCFACP.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCFACP.class.php b/wcfsetup/install/files/lib/system/WCFACP.class.php index 155944c872..938b2d627b 100644 --- a/wcfsetup/install/files/lib/system/WCFACP.class.php +++ b/wcfsetup/install/files/lib/system/WCFACP.class.php @@ -45,10 +45,10 @@ class WCFACP extends WCF { * Does the user authentication. */ protected function initAuth() { - /** - * @todo FIX THIS! - */ - if ((!isset($_REQUEST['page']) || ($_REQUEST['page'] != 'Logout' && $_REQUEST['page'] != 'ACPCaptcha')) && (isset($_REQUEST['page']) || !isset($_REQUEST['form']) || $_REQUEST['form'] != 'Login')) { + // this is a work-around since neither RequestHandler + // nor RouteHandler are populated right now + $pathInfo = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : ''; + if (empty($pathInfo) || !preg_match('~^/(ACPCaptcha|Login)/~', $pathInfo)) { if (WCF::getUser()->userID == 0) { util\HeaderUtil::redirect('index.php/Login/'.SID_ARG_1ST); exit; -- 2.20.1