[Django] #28881: Common password validator does not handle case correctly

4 views
Skip to first unread message

Django

unread,
Dec 4, 2017, 12:00:25 AM12/4/17
to django-...@googlegroups.com
#28881: Common password validator does not handle case correctly
-----------------------------------------+------------------------
Reporter: Nick Farrell | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
The CommonPasswordValidator holds a set of common passwords in memory,
after strip()ing any whitespace.
While validating a password, it converts it to lowercase before comparing
to the set. However, the reference set was not converted to lowercase.

This is not a problem when using the default set of common passwords, as
they have been preprocessed to be lowercase. However, there is nothing in
the documentation indicating this preprocessing should occur.

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

Django

unread,
Dec 4, 2017, 12:07:28 AM12/4/17
to django-...@googlegroups.com
#28881: Common password validator does not handle case correctly
-------------------------------+--------------------------------------

Reporter: Nick Farrell | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by Nick Farrell:

Old description:

> The CommonPasswordValidator holds a set of common passwords in memory,
> after strip()ing any whitespace.
> While validating a password, it converts it to lowercase before comparing
> to the set. However, the reference set was not converted to lowercase.
>
> This is not a problem when using the default set of common passwords, as
> they have been preprocessed to be lowercase. However, there is nothing in
> the documentation indicating this preprocessing should occur.

New description:

The CommonPasswordValidator holds a set of common passwords in memory,
after strip()ing any whitespace.
While validating a password, it converts it to lowercase before comparing
to the set. However, the reference set was not converted to lowercase.

This is not a problem when using the default set of common passwords, as
they have been preprocessed to be lowercase. However, there is nothing in
the documentation indicating this preprocessing should occur.

https://github.com/django/django/pull/9414

--

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

Django

unread,
Dec 4, 2017, 12:07:51 AM12/4/17
to django-...@googlegroups.com
#28881: Common password validator does not handle case correctly
-------------------------------+--------------------------------------

Reporter: Nick Farrell | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by Nick Farrell:

Old description:

> The CommonPasswordValidator holds a set of common passwords in memory,


> after strip()ing any whitespace.
> While validating a password, it converts it to lowercase before comparing
> to the set. However, the reference set was not converted to lowercase.
>
> This is not a problem when using the default set of common passwords, as
> they have been preprocessed to be lowercase. However, there is nothing in
> the documentation indicating this preprocessing should occur.
>

> https://github.com/django/django/pull/9414

New description:

The CommonPasswordValidator holds a set of common passwords in memory,
after strip()ing any whitespace.
While validating a password, it converts it to lowercase before comparing
to the set. However, the reference set was not converted to lowercase.

This is not a problem when using the default set of common passwords, as
they have been preprocessed to be lowercase. However, there is nothing in
the documentation indicating this preprocessing should occur.

--

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

Django

unread,
Dec 4, 2017, 12:08:04 AM12/4/17
to django-...@googlegroups.com
#28881: Common password validator does not handle case correctly
-------------------------------+--------------------------------------

Reporter: Nick Farrell | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.0
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Nick Farrell):

* version: 1.11 => 2.0


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

Django

unread,
Dec 4, 2017, 10:48:50 AM12/4/17
to django-...@googlegroups.com
#28881: Document that CommonPasswordValidator assumes all words are lower case
--------------------------------------+------------------------------------

Reporter: Nick Farrell | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 2.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* component: Uncategorized => Documentation
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted


Comment:

I think documenting the existing requirement for the password list to be
lower case would be fine. A documentation fix would address the problem
for older versions of Django and also avoid unnecessary computations for
lists that are already lower case.

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

Django

unread,
Jan 13, 2018, 5:08:33 PM1/13/18
to django-...@googlegroups.com
#28881: Document that CommonPasswordValidator assumes all words are lower case
--------------------------------------+------------------------------------
Reporter: Nick Farrell | Owner: Karmen
Type: Cleanup/optimization | Status: assigned

Component: Documentation | Version: 2.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Karmen):

* owner: nobody => Karmen
* status: new => assigned


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

Django

unread,
Jan 15, 2018, 3:44:22 AM1/15/18
to django-...@googlegroups.com
#28881: Document that CommonPasswordValidator assumes all words are lower case
-------------------------------------+-------------------------------------

Reporter: Nick Farrell | Owner: Karmen
Type: | Status: assigned
Cleanup/optimization |

Component: Documentation | Version: 2.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1
* stage: Accepted => Ready for checkin


Comment:

[https://github.com/django/django/pull/9586#pullrequestreview-88743187 PR]
adds small doc fix.

--
Ticket URL: <https://code.djangoproject.com/ticket/28881#comment:6>

Django

unread,
Jan 15, 2018, 10:37:05 AM1/15/18
to django-...@googlegroups.com
#28881: Document that CommonPasswordValidator assumes all words are lower case
-------------------------------------+-------------------------------------
Reporter: Nick Farrell | Owner: Karmen
Type: | Status: closed

Cleanup/optimization |
Component: Documentation | Version: 2.0
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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

In [changeset:"146317b734275daddcc9b5e240b3c48b508fc6e6" 146317b7]:
{{{
#!CommitTicketReference repository=""
revision="146317b734275daddcc9b5e240b3c48b508fc6e6"
[2.0.x] Fixed #28881 -- Doc'd that CommonPasswordValidator's password list
must be lowercase.

Backport of 4fcd28d442c2fec56f544f99cb658f33f847824c from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28881#comment:8>

Django

unread,
Jan 15, 2018, 10:37:06 AM1/15/18
to django-...@googlegroups.com
#28881: Document that CommonPasswordValidator assumes all words are lower case
-------------------------------------+-------------------------------------
Reporter: Nick Farrell | Owner: Karmen
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 2.0
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"4fcd28d442c2fec56f544f99cb658f33f847824c" 4fcd28d]:
{{{
#!CommitTicketReference repository=""
revision="4fcd28d442c2fec56f544f99cb658f33f847824c"


Fixed #28881 -- Doc'd that CommonPasswordValidator's password list must be
lowercase.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28881#comment:7>

Reply all
Reply to author
Forward
0 new messages