From 4d2c9f705592bd76b10ba4ffa02aa51da117e976 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Sun, 24 Mar 2002 08:28:41 +0000 Subject: [PATCH] Redirect the wrong access to the root pf the folder as index.php are in place for such ocasions. This removes the bug into the redirector when the access failure is within a plugin. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2630 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/auth.php | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/functions/auth.php b/functions/auth.php index 6ce4e4a6..b7ad374a 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -20,6 +20,7 @@ require_once( '../functions/page_header.php' ); if (! isset($base_uri)) { ereg ('(^.*/)[^/]+/[^/]+$', $PHP_SELF, $regs); $base_uri = $regs[1]; + } function is_logged_in () { @@ -27,22 +28,24 @@ function is_logged_in () { if ( session_is_registered('user_is_logged_in') ) { return; + } else { + + if (!isset($frame_top) || $frame_top == '' ) { + $frame_top = '_top'; + } + + set_up_language($squirrelmail_language, true); + + displayHtmlHeader( _("You must be logged in to access this page.") ); + + echo "\n" . + ' 

' . + _("You must be logged in to access this page.").'

' . + '' . + _("Go to the login page") . "\n" . + "
\n"; + exit; } - - if (!isset($frame_top) || $frame_top == '' ) { - $frame_top = '_top'; - } - - set_up_language($squirrelmail_language, true); - - displayHtmlHeader( 'SquirrelMail', '', FALSE ); - - echo "\n" . - '

' . - _("You must be logged in to access this page.").'

' . - ""._("Go to the login page")."\n" . - "
\n"; - exit; } ?> -- 2.25.1