Skip to content

Commit 55fe8c9

Browse files
committed
minor #16858 [Security] Enforce maximum username length (javiereguiluz)
This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [Security] Enforce maximum username length Fixes #16856. Commits ------- 0e14ecf [Security] Enforce maximum username length
2 parents da8274a + 0e14ecf commit 55fe8c9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

security/custom_authenticator.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ using :ref:`the user provider <security-user-providers>`::
205205
// ...
206206
$passport = new Passport(new UserBadge($email), $credentials);
207207

208+
.. note::
209+
210+
The maximum length allowed for the user identifier is 4096 characters to
211+
prevent `session storage flooding`_ attacks.
212+
208213
.. note::
209214

210215
You can optionally pass a user loader as second argument to the
@@ -373,3 +378,5 @@ authenticator methods (e.g. ``createToken()``)::
373378
return new CustomOauthToken($passport->getUser(), $passport->getAttribute('scope'));
374379
}
375380
}
381+
382+
.. _`session storage flooding`: https://symfony.com/blog/cve-2016-4423-large-username-storage-in-session

0 commit comments

Comments
 (0)