File tree 2 files changed +27
-0
lines changed
Filter options
2 files changed +27
-0
lines changed
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ Configuration
184
184
* `validation `_
185
185
186
186
* :ref: `cache <reference-validation-cache >`
187
+ * :ref: `disable_not_compromised_password <reference-validation-disable_not_compromised_password >`
187
188
* `email_validation_mode `_
188
189
* :ref: `enable_annotations <reference-validation-enable_annotations >`
189
190
* :ref: `enabled <reference-validation-enabled >`
@@ -1777,6 +1778,26 @@ has to implement the :class:`Symfony\\Component\\Validator\\Mapping\\Cache\\Cach
1777
1778
Set this option to ``validator.mapping.cache.doctrine.apc `` to use the APC
1778
1779
cache provide from the Doctrine project.
1779
1780
1781
+ .. _reference-validation-disable_not_compromised_password :
1782
+
1783
+ disable_not_compromised_password
1784
+ ................................
1785
+
1786
+ **type **: ``boolean `` **default **: ``false ``
1787
+
1788
+ .. versionadded :: 4.3
1789
+
1790
+ The ``disable_not_compromised_password `` option was introduced in Symfony 4.3.
1791
+
1792
+ The :doc: `NotCompromisedPassword </reference/constraints/NotCompromisedPassword >`
1793
+ constraint makes HTTP requests to a public API to check if the given password
1794
+ has been compromised in a data breach.
1795
+
1796
+ If you set this option to ``true ``, no HTTP requests will be made and the given
1797
+ password will be considered valid. This is useful when you don't want or can't
1798
+ make HTTP requests, such as in ``dev `` and ``test `` environments or in
1799
+ continuous integration servers.
1800
+
1780
1801
.. _reference-validation-enable_annotations :
1781
1802
1782
1803
enable_annotations
Original file line number Diff line number Diff line change @@ -97,6 +97,12 @@ For example, if the password is ``test``, the entire SHA-1 hash is
97
97
``a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 `` but the validator only sends
98
98
``a94a8 `` to the ``haveibeenpwned.com `` API.
99
99
100
+ .. seealso ::
101
+
102
+ When using this constraint inside a Symfony application, define the
103
+ :ref: `disable_not_compromised_password <reference-validation-disable_not_compromised_password >`
104
+ option to avoid making HTTP requests in the ``dev `` and ``test `` environments.
105
+
100
106
Available Options
101
107
-----------------
102
108
You can’t perform that action at this time.
0 commit comments