Project

General

Profile

Actions

Defect #1890

closed

LDAP Filter can't have spaces

Added by Ryan G over 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Administration
Target version:
Start date:
2008-09-11
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

ruby-net-ldap doesn't like the ldap filter to contain spaces. The input for LDAP attributes should be check for this and other requirements if necessary. The ldap search function fails silently if there is a space.

Ex. (which happened to me)

I copied and pasted the sAMAccountName attribute into the login field, I didn't notice but I grabbed the space at the end also. I couldn't get LDAP auth to work b/c the filter was set to "sAMAccountName =ryan.gibbons" . Even a simple .trim() fucntion would fix this (not sure if ruby has that), but I think check the input for invalid LDAP filter characters wouldn't be a bad thing.

I am running r1784 from svn.

Actions #1

Updated by Jean-Philippe Lang over 16 years ago

  • Status changed from New to Resolved
  • Target version set to 0.8
  • Resolution set to Fixed

Attribute names are now stripped (r1894).

I think check the input for invalid LDAP filter characters wouldn't be a bad thing

I agree but I'm not sure what characters should be allowed. Maybe /^[a-zA-Z0-9\-]+$/ ?

Actions #2

Updated by Jean-Philippe Lang about 16 years ago

  • Category set to Administration
  • Status changed from Resolved to Closed

Fill a request for LDAP attribute validation if needed.

Actions

Also available in: Atom PDF