mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Fixed #27467 -- Made UserAttributeSimilarityValidator max_similarity=0/1 work as documented.
Thanks goblinJoel for the report and feedback.
This commit is contained in:
parent
45e01df373
commit
0d9ff873d9
3 changed files with 21 additions and 7 deletions
|
@ -545,11 +545,10 @@ Django includes four validators:
|
|||
is used: ``'username', 'first_name', 'last_name', 'email'``.
|
||||
Attributes that don't exist are ignored.
|
||||
|
||||
The maximum similarity the password can have, before it is rejected, can
|
||||
be set with the ``max_similarity`` parameter, on a scale of 0 to 1.
|
||||
A setting of 0 will cause all passwords to be rejected, whereas a setting
|
||||
of 1 will cause it to only reject passwords that are identical to an
|
||||
attribute's value.
|
||||
The minimum similarity of a rejected password can be set on a scale of 0 to
|
||||
1 with the ``max_similarity`` parameter. A setting of 0 rejects all
|
||||
passwords, whereas a setting of 1 rejects only passwords that are identical
|
||||
to an attribute's value.
|
||||
|
||||
.. class:: CommonPasswordValidator(password_list_path=DEFAULT_PASSWORD_LIST_PATH)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue