Commit 34d44eb
committed
bug symfony#53172 [SecurityBundle] Prevent to login/logout without a request context (symfonyaml)
This PR was squashed before being merged into the 6.3 branch.
Discussion
----------
[SecurityBundle] Prevent to login/logout without a request context
| Q | A
| ------------- | ---
| Branch? | 6.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix symfony#53170
| License | MIT
Using `Security::login()` in a context without request throws a type error
See all details in the issue symfony#53170
In this PR, we prevent to use `Security::login()` and `Security::logout()` without a request context, to avoid a fatal error.
Commits
-------
aaa9392 [SecurityBundle] Prevent to login/logout without a request contextFile tree
2 files changed
+52
-2
lines changed- src/Symfony/Bundle/SecurityBundle
- Tests
2 files changed
+52
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
95 | 104 | | |
96 | | - | |
97 | | - | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
255 | 277 | | |
256 | 278 | | |
257 | 279 | | |
| |||
458 | 480 | | |
459 | 481 | | |
460 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
461 | 504 | | |
462 | 505 | | |
463 | 506 | | |
| |||
0 commit comments