#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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070194ece66271-21a24f13-8647-4393-a186-2703f04a06ca-000000%40eu-central-1.amazonses.com.

Reply via email to