Opened 9 years ago
Closed 8 years ago
#12680 closed defect (fixed)
LDAP "valid_users" groups with spaces not properly handled
Reported by: | mddeff | Owned by: | mddeff |
---|---|---|---|
Priority: | normal | Component: | DirectoryAuthPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
Versions
Trac - 1.0.9
AccountManager - 0.4.4
TracDirectoryAuth - 2.0.1dev
Issue
Using a LDAP group with spaces in it for group_validusers
field.
Expected behavior
Properly authenticates users in the "Example Employees" group.
Actual behavoir
Server throws error 500.
Details
See line 58 of log file where auth module tries to search LDAP for normalized (lowercase/underscored) version of the group (example_employees
).
Expected behavior is achieved when group_validusers
is set to a group without spaces. (tracusers
)
Redacted log file can be found at: http://pastebin.centos.org/40076/
Attachments (1)
Change History (8)
comment:1 Changed 9 years ago by
Summary: | LDAP groups not properly handled → LDAP "valid_users" groups with spaces not properly handled |
---|
Changed 8 years ago by
comment:2 Changed 8 years ago by
comment:3 Changed 8 years ago by
Recommended steps for preparing patches can be found in trac:TracDev/SubmittingPatches.
comment:5 Changed 8 years ago by
Status: | new → accepted |
---|
please test the version 2.1.0-SNAPSHOT (-> branches)
comment:6 Changed 8 years ago by
Owner: | changed from bebbo to mddeff |
---|---|
Status: | accepted → assigned |
comment:7 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
My tests with spaces in group_basedn and/or group_validusers are successful.
I also had this problem... see attached auth.py.
I made a simple change on line 357 that replaces
_
back into a space. That resolves your problem.I also had to disable LDAP referrals for it to work on my AD, that was on line 306.
Lastly, my corporation lists folks on AD CN with Lastname, Firstname and that
,
separating the Last and First needs escaping on the plugin, that change is on line 353.Alvaro