From 782d74e053dc44949b8d5dad195dc3589fa358d7 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 11 Feb 2011 11:31:20 +0100 Subject: [PATCH] MDL-26322 always allow https in login local redirection test This fixes problems for sites that use loginhtts where the redirection after login did not work for pages that require https such as the forgotten passowrds page. --- login/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login/index.php b/login/index.php index d7fb3bd03ca..8b5b3802418 100644 --- a/login/index.php +++ b/login/index.php @@ -179,7 +179,7 @@ httpsrequired(); $urltogo = $CFG->wwwroot.'/user/edit.php'; // We don't delete $SESSION->wantsurl yet, so we get there later - } else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) { + } else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0 or strpos($SESSION->wantsurl, str_replace('http://', 'https://', $CFG->wwwroot)) === 0)) { $urltogo = $SESSION->wantsurl; /// Because it's an address in this site unset($SESSION->wantsurl);