Skip to content

Commit

Permalink
MDL-37020 auth_shibboleth: check if target variable is actually set
Browse files Browse the repository at this point in the history
  • Loading branch information
mackensen committed Dec 5, 2012
1 parent 0395306 commit ab0ccc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion auth/shibboleth/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit ab0ccc6

Please sign in to comment.