Re: [Django] #33696: Add a fail fast option to validate_password(). (was: Add a fail fast option to validate_password)

3 views
Skip to first unread message

Django

unread,
May 11, 2022, 1:48:07 AM5/11/22
to django-...@googlegroups.com
#33696: Add a fail fast option to validate_password().
-------------------------------------+-------------------------------------
Reporter: Parth Verma | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
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 Mariusz Felisiak):

* status: new => closed
* has_patch: 1 => 0
* resolution: => wontfix


Comment:

Thanks for this ticket, however it looks quite niche. In most of cases
it's preferable to return all validation errors to users, without
unnecessary round-trip. You can always pass the `password_validators`
argument in your own code to fail-fast on non-expensive validators, e.g.
{{{
validate_password(password, user, password_validators=non-db-validators)
validate_password(password, user, password_validators=expensive-db-
validators)
}}}

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

Reply all
Reply to author
Forward
0 new messages