Vote #63854
完了LDAP Filter can't have spaces
0%
説明
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.
journals
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\-]+$/@ ?
--------------------------------------------------------------------------------
Fill a request for LDAP attribute validation if needed.
--------------------------------------------------------------------------------