MDL-37020 auth_shibboleth: check if target variable is actually set

This commit is contained in:
Charles Fulton
2012-12-11 09:48:41 +13:00
committed by Sam Hemelryk
parent 52d4168038
commit 473eadfe10
+4 -1
View File
@@ -7,7 +7,10 @@
$PAGE->set_url('/auth/shibboleth/index.php');
// Support for WAYFless URLs.
$SESSION->wantsurl = optional_param('target', $SESSION->wantsurl, PARAM_LOCALURL);
$target = optional_param('target', '', PARAM_LOCALURL);
if (!empty($target)) {
$SESSION->wantsurl = $target;
}
if (isloggedin() && !isguestuser()) { // Nothing to do
if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) {