mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-9399 auth/ldap: NTLM SSO - move textlib conversion earlier
From Iñaki Arenaza - fix for ... I forgot to put the textlib conversion call before the block of code that uses $extusername, so it completely breaks the user validation process.
This commit is contained in:
parent
83cd2dce5a
commit
6221a32121
@ -85,6 +85,10 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
return false;
|
||||
}
|
||||
|
||||
$textlib = textlib_get_instance();
|
||||
$extusername = $textlib->convert(stripslashes($username), 'utf-8', $this->config->ldapencoding);
|
||||
$extpassword = $textlib->convert(stripslashes($password), 'utf-8', $this->config->ldapencoding);
|
||||
|
||||
//
|
||||
// Before we connect to LDAP, check if this is an AD SSO login
|
||||
// if we succeed in this block, we'll return success early.
|
||||
@ -125,10 +129,6 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
unset($key);
|
||||
|
||||
|
||||
$textlib = textlib_get_instance();
|
||||
$extusername = $textlib->convert(stripslashes($username), 'utf-8', $this->config->ldapencoding);
|
||||
$extpassword = $textlib->convert(stripslashes($password), 'utf-8', $this->config->ldapencoding);
|
||||
|
||||
$ldapconnection = $this->ldap_connect();
|
||||
|
||||
if ($ldapconnection) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user