[Django] #36180: Consider adding repeated pattern password validator

5 views
Skip to first unread message

Django

unread,
Feb 9, 2025, 5:48:35 PMFeb 9
to django-...@googlegroups.com
#36180: Consider adding repeated pattern password validator
---------------------------------+----------------------------------------
Reporter: Michel Le Bihan | Type: New feature
Status: new | Component: contrib.auth
Version: dev | 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
---------------------------------+----------------------------------------
Hello,

Currently the password validators in Django will happily accept
`aaaaaaaaaaaa` ('a' * 12) as a password. I believe that adding a password
validator that checks for repeated patterns would vastly improve password
complexity. The implementation of such a validator is very simple:

{{{
import re

repeat_matcher = re.compile(r'(.+?)\1+')
match = repeat_matcher.match(password)
repeat_cnt = len(match.group(0)) // len(match.group(1)) - 1 if match else
0
}}}
`repeat_cnt` for `alaalaala` should be 2.
--
Ticket URL: <https://code.djangoproject.com/ticket/36180>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 10, 2025, 3:52:51 AMFeb 10
to django-...@googlegroups.com
#36180: Consider adding repeated pattern password validator
---------------------------------+--------------------------------------
Reporter: Michel Le Bihan | Owner: (none)
Type: New feature | Status: closed
Component: contrib.auth | Version: dev
Severity: Normal | Resolution: wontfix
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 Sarah Boyce):

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

Comment:

Hi Michel,

As you are suggesting a new feature for Django, you first need to propose
and discuss the idea with the community and gain consensus. To do that,
please consider starting a new conversation on the
[https://forum.djangoproject.com/c/internals/5 Django Forum], where you'll
reach a broader audience and receive additional feedback.

I'll close the ticket for now, but if the community agrees with the
proposal, please return to this ticket and reference the forum discussion
so we can re-open it. For more information, please refer to
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features the documented guidelines for requesting
features].
--
Ticket URL: <https://code.djangoproject.com/ticket/36180#comment:1>
Reply all
Reply to author
Forward
0 new messages