diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index 7b39daf3628..96d9bbaf23d 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -1686,7 +1686,7 @@ class auth_plugin_ldap extends auth_plugin_base { // we don't want to use at all. As we can't get rid of it, just point // $SESSION->wantsurl to $CFG->wwwroot (after all, we came from there). if (empty($SESSION->wantsurl) - && (get_referer() == $CFG->httpswwwroot.'/auth/ldap/ntlmsso_finish.php')) { + && (get_local_referer() == $CFG->httpswwwroot.'/auth/ldap/ntlmsso_finish.php')) { $SESSION->wantsurl = $CFG->wwwroot; }