1368: LDAP not properly translating %s for LDAP

shawn******@gmai***** (Google Code) (Is this you? Claim this profile.)
Dec. 22, 2009
What version are you running?
1.0.5.1

What's the URL of the page containing the problem?

http://rb.novanoc.com/

What steps will reproduce the problem?
1. Set information for LDAP
LDAP Server: ldap://auth01.novanoc.com:389
LDAP Base DN: ou=Users,dc=novanoc,dc=com
E-Mail Domain: novanetworks.com
E-Mail LDAP Attribute: mail
User Mask: uid=%s (or (uid=%s))
Anonymous User Mask: uid=%s (or (uid=%s))

2. Save settings / Restart apache (because you can!)
3. Log in with LDAP account that works on the server in question

What is the expected output? What do you see instead?
Login successful is expected, instead I get login failed.

From my debug output on the LDAP server:

Oct 26 14:27:28 Auth01 slapd[4226]: conn=1586528 fd=21 ACCEPT from
IP=30.30.1.207:47230 (IP=0.0.0.0:389)
Oct 26 14:27:28 Auth01 slapd[4226]: conn=1586528 op=0 do_bind: invalid dn
((uid=%s))
Oct 26 14:27:28 Auth01 slapd[4226]: conn=1586528 op=0 RESULT tag=97 err=34
text=invalid DN


What operating system are you using? What browser?
Server: Ubuntu 8.04 LTS, OpenLDAP
Desktop: Vista Busines 32 bit, Firefox 3.5.3

Please provide any additional information below.
Doesn't appear to translate the %s for string.
chipx86
#1 chipx86
The point of the anonymous user is to not reference a username. I'm not sure that the
anonymous user mask makes sense.

I can't tell from your strings above, but is the value for the user mask actually
"uid=%s (or (uid=%s))" or are you saying you've tried both "uid=%s" and "(uid=%s)" ?
  • +NeedInfo
david
#2 david
  • -NeedInfo
    +Incomplete
#3 rtata*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Exactly the same issue is seen with RB 1.5 stable.
LDAP DN reporting invalid syntax. 
Config: RHEL 5.5 and Apache webserver. 
Tried giving User mask as uid=%s, (uid=%s), '(uid=%s)', "(uid=%s)" - all returned the same error.
Log:
2010-11-16 17:32:59,803 - INFO - Log file for Review Board v1.5 (PID 9859)
2010-11-16 17:32:59,936 - WARNING - LDAP error: {'info': 'Invalid DN', 'desc': 'Invalid DN syntax'}

Is there any other workaround/check for this issue?
ldapsearch command is returning all results with no problem.

Thanks.