Code

Opened 8 years ago

Closed 6 years ago

#3165 closed defect (fixed)

[patch] Auth System username prompt doesn't match what it accepts (does not allow underscores)

Reported by: cmgreen@… Owned by: nobody
Component: contrib.admin Version: master
Severity: normal Keywords: username admin djangoadmin
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Using the current SVN, I ran my first syncdb and it didn't accept an underscore when it says it does.

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (Leave blank to use 'cmgreen'): !cmgreen
Error: That username is invalid. Use only letters, digits and underscores.
Username (Leave blank to use 'cmgreen'): _cmgreen
Error: That username is invalid. Use only letters, digits and underscores.
Username (Leave blank to use 'cmgreen'): cmgreen_
Error: That username is invalid. Use only letters, digits and underscores.
Username (Leave blank to use 'cmgreen'): cmgreen_
Error: That username is invalid. Use only letters, digits and underscores.
Username (Leave blank to use 'cmgreen'): cmgreen77
E-mail address: cmgreen@…

Attachments (1)

createsuperuser.patch (939 bytes) - added by SmileyChris 8 years ago.
Assuming the validation message should stay the same, here's the fix

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by SmileyChris

Assuming the validation message should stay the same, here's the fix

comment:1 Changed 8 years ago by SmileyChris

  • Summary changed from Auth System username prompt doesn't match what it accepts to [patch] Auth System username prompt doesn't match what it accepts

comment:2 Changed 7 years ago by Simon G. <dev@…>

  • Keywords username admin djangoadmin added
  • Triage Stage changed from Unreviewed to Design decision needed

Either the prompt needs to be changed to just letters/numbers or the validator needs to be fixed (as per SmileyChris's patch).

comment:3 Changed 7 years ago by Simon G. <dev@…>

  • Summary changed from [patch] Auth System username prompt doesn't match what it accepts to [patch] Auth System username prompt doesn't match what it accepts (does not allow underscores)

comment:4 Changed 7 years ago by jacob

  • Triage Stage changed from Design decision needed to Ready for checkin

comment:5 Changed 6 years ago by gwilson

  • Resolution set to fixed
  • Status changed from new to closed

in [7018].

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.