From: pdontthink Date: Mon, 12 Oct 2009 22:11:35 +0000 (+0000) Subject: Avoid prefixing global $check_referrer value with protocol prefix - use local variabl... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b0f43f13a2e3271d208eebeeb4abf0e573529b46;p=squirrelmail.git Avoid prefixing global $check_referrer value with protocol prefix - use local variable instead git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13865 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/auth.php b/functions/auth.php index 01048a35..a9622906 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -55,12 +55,12 @@ function sqauth_is_logged_in() { if ($check_referrer == '###DOMAIN###') $check_referrer = $domain; if (!empty($check_referrer)) { $ssl_check_referrer = 'https://' . $check_referrer; - $check_referrer = 'http://' . $check_referrer; + $plain_check_referrer = 'http://' . $check_referrer; } if (sqsession_is_registered('user_is_logged_in') && (!$check_referrer || empty($referrer) || ($check_referrer && !empty($referrer) - && (strpos(strtolower($referrer), strtolower($check_referrer)) === 0 + && (strpos(strtolower($referrer), strtolower($plain_check_referrer)) === 0 || strpos(strtolower($referrer), strtolower($ssl_check_referrer)) === 0)))) { return true; }