E-mail addresses as LDAP usernames fail validation

28 views
Skip to first unread message

Augusto Herrmann

unread,
May 22, 2013, 1:02:46 PM5/22/13
to rhodecode
Hi,

we have been experimenting with version 1.5.4 (haven't got around to
the new 1.6.0 yet, but judging from the changelog and the validator
code on beta branch [1], it seems like this hasn't changed since then)
of Rhodecode, and have set up LDAP authentication. Some of our LDAP
usernames are e-mail addresses, so they have "@" characters in them.
These users cannot authenticate in Rhodecode because Rhodecode rejects
the username as invalid because of the supposedly invalid "@"
characters in them (it fails the match against the regular expression
^[a-zA-Z0-9]{1}[a-zA-Z0-9\-\_\.]*$ [1]). That happens even before
checking LDAP.

Is there a compelling reason to outright reject those types of
usernames? Isn't this a common use case enough to be allowed into the
main code of Rhodecode, instead of us having to patch it in our
instance?

[1]
https://bitbucket.org/marcinkuzminski/rhodecode/src/7d29355db6f44802d3af3c37b3139e97201ed30c/rhodecode/model/validators.py?at=beta#cl-108

Best regards,
Augusto Herrmann

Marcin Kuzminski

unread,
May 22, 2013, 1:19:17 PM5/22/13
to rhod...@googlegroups.com
Hi,

Yes that's a good point. I'm currently working on pluggable auth system and merging this to beta branch, i'll fix it there.

Thanks for the feedback !

Marcin Kuzminski



--
You received this message because you are subscribed to the Google Groups "rhodecode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rhodecode+...@googlegroups.com.
To post to this group, send email to rhod...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages