Commit 34f2209
committed
minor #17512 [Security] User in expression cannot be "anon" (HypeMC)
This PR was merged into the 6.0 branch.
Discussion
----------
[Security] User in expression cannot be "anon"
Since Symfony 6.0, the `TokenInterface::getUser()` method [always returns an instance of `UserInterface` or `null`](https://github.com/symfony/symfony/blob/aee9ea5be25036706cb7dfd3047d48dad0f8e892/UPGRADE-6.0.md?plain=1#L242), and since the [`ExpressionVoter` fetches the user from the token](https://github.com/symfony/symfony/blob/aee9ea5be25036706cb7dfd3047d48dad0f8e892/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php#L82), it shouldn't be possible for it to be `anon` any more.
Commits
-------
cb091de [Security] User in expression cannot be "anon"1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
0 commit comments