Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.8, 1.9.2
-
Fix Version/s: None
-
Component/s: Authentication
-
Labels:
-
Environment:PHP 5.2.1
-
Database:MySQL
-
Affected Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
Description
Windows LDAP server (a.k.a. Active Directory) does not differenciate alphabet of multi-byte character from alphabet of single-byte character. At least, Japanese Windows LDAP server does not differenciate them.
Under this environment, an user who inputs user name in the alphabet of multi-byte characters is successfully authenticated by LDAP server even though his or her user name actually consits of alphabet of single-byte characters in LDAP. In this situation, LDAP authentication plugin of moodle creates an user record for user name in the alphabet of multi-byte characters into moodle database when an user inputs user name in alphabet of multi-byte characters.
That is, an user record in moodle database might be created duplicatedly.
I attached my patch that fixes the problem, it might look like dirty though.
What ldap version did you use? I am getting single byte platform Windows encoding for v2 and utf-8 for version 3.
I have looked at the patch and I do not understand why not just return false if cn and username do not match. I am not sure if we should trust LDAP server that behaves the way you describe.