You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference/constraints/NoSuspiciousCharacters.rst
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ NoSuspiciousCharacters
16
16
"symfony.com" and "ѕymfony.com" look similar, but the latter actually starts with a
17
17
`cyrillic small letter dze`_. It could make a user think they'll navigate to Symfony's
18
18
website, whereas it would be somewhere else.
19
-
This is a kind of `spoofing attack`_ (called "IDN homograph attack"): it tries to
19
+
This is a kind of `spoofing attack`_ (called "IDN homograph attack"). It tries to
20
20
identify something as something else to exploit the resulting confusion.
21
21
This is why it is recommended to check user-submitted, public-facing identifiers for
22
22
suspicious characters in order to prevent such attacks.
@@ -104,8 +104,8 @@ Options
104
104
This option is a bitmask of the checks you want to perform on the string:
105
105
106
106
* ``NoSuspiciousCharacters::CHECK_INVISIBLE`` checks for the presence of invisible characters such as zero-width spaces, or character sequences that are likely not to display, such as multiple occurrences of the same non-spacing mark.
107
-
* ``NoSuspiciousCharacters::CHECK_MIXED_NUMBERS`` (since ICU 58) checks for numbers from different numbering systems.
108
-
* ``NoSuspiciousCharacters::CHECK_HIDDEN_OVERLAY`` (since ICU 62) checks for combining characters hidden in their preceding one.
107
+
* ``NoSuspiciousCharacters::CHECK_MIXED_NUMBERS`` (usable with ICU 58 or higher) checks for numbers from different numbering systems.
108
+
* ``NoSuspiciousCharacters::CHECK_HIDDEN_OVERLAY`` (usable with ICU 62 or higher) checks for combining characters hidden in their preceding one.
109
109
110
110
You can also configure additional requirements using :ref:`locales <locales>` and
111
111
:ref:`restrictionLevel <restrictionlevel>`.
@@ -126,20 +126,20 @@ Passing an empty array, or configuring :ref:`restrictionLevel <restrictionlevel>
126
126
``restrictionLevel``
127
127
~~~~~~~~~~~~~~~~~~~~
128
128
129
-
**type**: ``integer`` **default**: ``NoSuspiciousCharacters::RESTRICTION_LEVEL_MODERATE`` on ICU >= 58, else ``NoSuspiciousCharacters::RESTRICTION_LEVEL_SINGLE_SCRIPT``
129
+
**type**: ``integer`` **default**: ``NoSuspiciousCharacters::RESTRICTION_LEVEL_MODERATE`` on ICU >= 58, otherwise ``NoSuspiciousCharacters::RESTRICTION_LEVEL_SINGLE_SCRIPT``
130
130
131
131
Configures the set of acceptable characters for the validated string through a
132
132
specified "level":
133
133
134
134
* ``NoSuspiciousCharacters::RESTRICTION_LEVEL_MINIMAL`` requires the string's characters to match :ref:`the configured locales <locales>`'.
135
135
* ``NoSuspiciousCharacters::RESTRICTION_LEVEL_MODERATE`` also requires the string to be `covered`_ by Latin and any one other `Recommended`_ or `Limited Use`_ script, except Cyrillic, Greek, and Cherokee.
136
-
* ``NoSuspiciousCharacters::RESTRICTION_LEVEL_HIGH`` (since ICU 58) also requires the string to be `covered`_ by any of the following sets of scripts:
136
+
* ``NoSuspiciousCharacters::RESTRICTION_LEVEL_HIGH`` (usable with ICU 58 or higher) also requires the string to be `covered`_ by any of the following sets of scripts:
137
137
138
138
* Latin + Han + Bopomofo (or equivalently: Latn + Hanb)
139
139
* Latin + Han + Hiragana + Katakana (or equivalently: Latn + Jpan)
140
140
* Latin + Han + Hangul (or equivalently: Latn + Kore)
141
141
* ``NoSuspiciousCharacters::RESTRICTION_LEVEL_SINGLE_SCRIPT`` also requires the string to be `single-script`_.
142
-
* ``NoSuspiciousCharacters::RESTRICTION_LEVEL_ASCII`` (since ICU 58) also requires the string's characters to be in the ASCII range.
142
+
* ``NoSuspiciousCharacters::RESTRICTION_LEVEL_ASCII`` (usable with ICU 58 or higher) also requires the string's characters to be in the ASCII range.
143
143
144
144
You can accept all characters by setting this option to
0 commit comments