MDL-50884 auth_shibboleth: fix logout handler url generation

This patch fixes the shibboleth redirect url generation, that can create invalid url
if the shibboleth logout_handler setting has a parameter generating two parameters
with (?) instead of (&).

Thanks to Matteo Boni for the proposed solution.
This commit is contained in:
Simey Lameze 2015-09-02 11:20:27 +08:00
parent f495510548
commit ef6998015f

View File

@ -210,7 +210,8 @@ class auth_plugin_shibboleth extends auth_plugin_base {
}
// Overwrite redirect in order to send user to Shibboleth logout page and let him return back
$redirect = $this->config->logout_handler.'?return='.urlencode($temp_redirect);
$redirecturl = new moodle_url($this->config->logout_handler, array('return' => $temp_redirect));
$redirect = $redirecturl->out();
}
}