[Django] #25457: createsuperuser password error message has incorrect format

9 views
Skip to first unread message

Django

unread,
Sep 24, 2015, 3:47:08 AM9/24/15
to django-...@googlegroups.com
#25457: createsuperuser password error message has incorrect format
------------------------------+--------------------
Reporter: uranusjr | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 1.9a1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 1
------------------------------+--------------------
{{{
$ ./manage.py createsuperuser
Username (leave blank to use 'uranusjr'):
Email address:
Password:
Password (again):
This password is too short. It must contain at least 8 characters., This
password is too common.
}}}

The problem is likely in
“django/contrib/auth/management/commands/createsuperuser.py”, where error
message is currently formatted like this:

{{{
try:
validate_password(password2, self.UserModel(**fake_user_data))
except exceptions.ValidationError as err:
self.stderr.write(', '.join(err.messages))
password = None
}}}

So either the exception message needs to be re-formatted to not using a
complete sentence, or the messages need to be joined without the comma.

--
Ticket URL: <https://code.djangoproject.com/ticket/25457>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 24, 2015, 11:03:44 AM9/24/15
to django-...@googlegroups.com
#25457: createsuperuser password error message has incorrect format
------------------------------+------------------------------------

Reporter: uranusjr | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 1.9a1
Severity: Normal | Resolution:
Keywords: 1.9 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* easy: 0 => 1
* keywords: => 1.9
* needs_docs: => 0
* stage: Unreviewed => Accepted


Comment:

It seems that joining with a newline could be appropriate.

--
Ticket URL: <https://code.djangoproject.com/ticket/25457#comment:1>

Django

unread,
Sep 24, 2015, 2:29:32 PM9/24/15
to django-...@googlegroups.com
#25457: createsuperuser password error message has incorrect format
------------------------------+------------------------------------

Reporter: uranusjr | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 1.9a1
Severity: Normal | Resolution:
Keywords: 1.9 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
------------------------------+------------------------------------

Comment (by uranusjr):

[https://github.com/django/django/pull/5352 Pull request created].

--
Ticket URL: <https://code.djangoproject.com/ticket/25457#comment:2>

Django

unread,
Sep 24, 2015, 2:29:57 PM9/24/15
to django-...@googlegroups.com
#25457: createsuperuser password error message has incorrect format
------------------------------+------------------------------------

Reporter: uranusjr | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 1.9a1
Severity: Normal | Resolution:
Keywords: 1.9 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
------------------------------+------------------------------------
Changes (by uranusjr):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/25457#comment:3>

Django

unread,
Sep 24, 2015, 7:46:00 PM9/24/15
to django-...@googlegroups.com
#25457: createsuperuser password error message has incorrect format
------------------------------+------------------------------------
Reporter: uranusjr | Owner: nobody
Type: Bug | Status: closed
Component: contrib.auth | Version: 1.9a1
Severity: Normal | Resolution: fixed

Keywords: 1.9 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"7372cdebed19a9d8e5527823c1e6825156babf98" 7372cdeb]:
{{{
#!CommitTicketReference repository=""
revision="7372cdebed19a9d8e5527823c1e6825156babf98"
Fixed #25457 -- Improved formatting of password validation errors in
management command output.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25457#comment:5>

Django

unread,
Sep 24, 2015, 7:46:00 PM9/24/15
to django-...@googlegroups.com
#25457: createsuperuser password error message has incorrect format
------------------------------+------------------------------------
Reporter: uranusjr | Owner: nobody
Type: Bug | Status: closed
Component: contrib.auth | Version: 1.9a1

Severity: Normal | Resolution: fixed
Keywords: 1.9 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"9581ac39a8b913db22f9874ae04aad46548dcdeb" 9581ac39]:
{{{
#!CommitTicketReference repository=""
revision="9581ac39a8b913db22f9874ae04aad46548dcdeb"
[1.9.x] Fixed #25457 -- Improved formatting of password validation errors
in management command output.

Backport of 7372cdebed19a9d8e5527823c1e6825156babf98 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25457#comment:4>

Reply all
Reply to author
Forward
0 new messages