MDL-41223 do not store any form of login URL in $SESSION->wantsurl

Credit goes to Michael Milette, thanks.
This commit is contained in:
Petr Škoda
2013-09-25 10:57:54 +10:00
committed by Marina Glancy
parent a943166fc1
commit 7c97129a9a
+2 -1
View File
@@ -274,7 +274,8 @@ if (empty($SESSION->wantsurl)) {
$_SERVER["HTTP_REFERER"] != $CFG->wwwroot &&
$_SERVER["HTTP_REFERER"] != $CFG->wwwroot.'/' &&
$_SERVER["HTTP_REFERER"] != $CFG->httpswwwroot.'/login/' &&
$_SERVER["HTTP_REFERER"] != $CFG->httpswwwroot.'/login/index.php')
strpos($_SERVER["HTTP_REFERER"], $CFG->httpswwwroot.'/login/?') !== 0 &&
strpos($_SERVER["HTTP_REFERER"], $CFG->httpswwwroot.'/login/index.php') !== 0) // There might be some extra params such as ?lang=.
? $_SERVER["HTTP_REFERER"] : NULL;
}