Permalink
Browse files

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.
  • Loading branch information...
1 parent d911c72 commit b792a64ab251372213b9855d7ecfa04a675fd369 @skodak skodak committed Feb 11, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 login/index.php
View
@@ -182,7 +182,7 @@
$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);

0 comments on commit b792a64

Please sign in to comment.