summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2021-12-27 14:48:03 +0100
committerCarlton Gibson <carlton.gibson@noumenal.es>2022-01-04 10:10:14 +0100
commitdf79ef03ac867c93caaa6be56bc69e66abfeef8f (patch)
treeb3a9a10bedcf469a106f10e122a5eb18ba0da942 /docs/topics
parent77531695850befad4dda7f9a0ce9e78b131ab5e1 (diff)
[4.0.x] Fixed CVE-2021-45115 -- Prevented DoS vector in UserAttributeSimilarityValidator.
Thanks Chris Bailey for the report. Co-authored-by: Adam Johnson <me@adamj.eu>
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/auth/passwords.txt14
1 files changed, 10 insertions, 4 deletions
diff --git a/docs/topics/auth/passwords.txt b/docs/topics/auth/passwords.txt
index c6383ed9a3..1e855abe96 100644
--- a/docs/topics/auth/passwords.txt
+++ b/docs/topics/auth/passwords.txt
@@ -609,10 +609,16 @@ Django includes four validators:
is used: ``'username', 'first_name', 'last_name', 'email'``.
Attributes that don't exist are ignored.
- 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.
+ The maximum allowed similarity of passwords can be set on a scale of 0.1
+ to 1.0 with the ``max_similarity`` parameter. This is compared to the
+ result of :meth:`difflib.SequenceMatcher.quick_ratio`. A value of 0.1
+ rejects passwords unless they are substantially different from the
+ ``user_attributes``, whereas a value of 1.0 rejects only passwords that are
+ identical to an attribute's value.
+
+ .. versionchanged:: 2.2.26
+
+ The ``max_similarity`` parameter was limited to a minimum value of 0.1.
.. class:: CommonPasswordValidator(password_list_path=DEFAULT_PASSWORD_LIST_PATH)