Modify

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)

auth.py (23.8 KB) - added by anonymous 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 9 years ago by mddeff

Summary: LDAP groups not properly handledLDAP "valid_users" groups with spaces not properly handled

Changed 8 years ago by anonymous

Attachment: auth.py added

comment:2 Changed 8 years ago by anonymous

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

comment:3 Changed 8 years ago by Ryan J Ollos

Recommended steps for preparing patches can be found in trac:TracDev/SubmittingPatches.

comment:4 Changed 8 years ago by bebbo

In 16070:

refs #12680

  • added new config property group_spaces2underscore which defaults to true.

Set this property to false to retain the spaces.

comment:5 Changed 8 years ago by bebbo

Status: newaccepted

please test the version 2.1.0-SNAPSHOT (-> branches)

comment:6 Changed 8 years ago by bebbo

Owner: changed from bebbo to mddeff
Status: acceptedassigned

comment:7 Changed 8 years ago by bebbo

Resolution: fixed
Status: assignedclosed

My tests with spaces in group_basedn and/or group_validusers are successful.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain mddeff.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.