1674: LDAP: username in django admin has too strict of validation rules

john.p.c********@gmai***** (Google Code) (Is this you? Claim this profile.)
david
david
Feb. 5, 2014
What version are you running? 1.5b2


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


What steps will reproduce the problem?

1. Configure for using ldap, in our case it is configured where uid=<email>
and that is what people use to login
2. In general things work, accounts get automatically created etc.
3. But if you go into Database Home/Auth/Users and attempt to edit a user
with a username containing "@foobar.com" it complains about invalid characters


What is the expected output? 

The django admin is saying that the field is limited to 30 chars and no
special characters.    I think this needs to be changed in order to support
usernames that are email address (this is a very common use case with LDAP).   

Also the 30 char limit is too short, it needs to be at least 60.   Many of
our users have very long full names (Indian) with multiple hyphens.


What operating system are you using? What browser?

Linux


Please provide any additional information below.
david
#1 david
This is part of Django's auth app, and nothing we can change.
  • +ThirdParty
#2 john.p.c********@gmai***** (Google Code) (Is this you? Claim this profile.)
I believe part of the point was missed.  The auto account creation for ldap users actually creates the invalid account name, that then can no longer be edited in the admin view.

I would suggest a code modification on the reviewboard ldap/login side that automatically strips @.*$ from the username.
david
#3 david
Okay, I guess.
  • -ThirdParty
    +New
david
#4 david
  • +Component-Accounts
david
#5 david
  • -New
    +PendingReview
  • +david
david
#6 david
Fixed in master (fc95975). This will ship in 2.0 beta 3. Thanks!
  • -PendingReview
    +Fixed