Skip to content

Commit b999b35

Browse files
committed
minor #14875 [Security] [csrf] Add documentation about breach (jderusse)
This PR was merged into the 5.3-dev branch. Discussion ---------- [Security] [csrf] Add documentation about breach fixes #14874 Commits ------- a1c303b Add documentation about breach
2 parents 2f2080e + a1c303b commit b999b35

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

security/csrf.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ this can be customized on a form-by-form basis::
8585

8686
// src/Form/TaskType.php
8787
namespace App\Form;
88-
88+
8989
// ...
9090
use App\Entity\Task;
9191
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -162,4 +162,19 @@ to check its validity::
162162
}
163163
}
164164

165+
CSRF Tokens and Compression Side-Channel Attacks
166+
------------------------------------------------
167+
168+
`BREACH`_ and `CRIME`_ are security exploits against HTTPS when using HTTP
169+
compression. Attacker can leverage information leaked by compression to recover
170+
targeted parts of the plaintext. To mitigate these attacks, and prevent an
171+
attacker from guessing the CSRF tokens, a random mask is prepended to the token
172+
and used to scramble it.
173+
174+
.. versionadded:: 5.3
175+
176+
The randomization of tokens was introduced in Symfony 5.3
177+
165178
.. _`Cross-site request forgery`: https://en.wikipedia.org/wiki/Cross-site_request_forgery
179+
.. _`BREACH`: https://en.wikipedia.org/wiki/BREACH
180+
.. _`CRIME`: https://en.wikipedia.org/wiki/CRIME

0 commit comments

Comments
 (0)