Commit 9707186
committed
bug #46960 [FrameworkBundle] Fail gracefully when forms use disabled CSRF (HeahDude)
This PR was merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle] Fail gracefully when forms use disabled CSRF
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | kind of
| New feature? | no
| Deprecations? | no
| Tickets | ~
| License | MIT
| Doc PR | ~
Relates to symfony/symfony-docs#16973.
Currently with the following config in Symfony demo:
```yaml
# config/packages/framework.yaml
framework:
csrf_protection: false
form:
csrf_protection: true
```
we get:
>The service "form.type_extension.csrf" has a dependency on a non-existent service "security.csrf.token_manager".
We should consider this PR as a bug fix to make this exception actionable.
Commits
-------
5990182698 [FrameworkBundle] Fail gracefully when forms use disabled CSRFFile tree
5 files changed
+41
-0
lines changed- DependencyInjection
- Tests/DependencyInjection
- Fixtures
- php
- xml
- yml
5 files changed
+41
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
499 | 503 | | |
500 | 504 | | |
501 | 505 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
87 | 95 | | |
88 | 96 | | |
89 | 97 | | |
| |||
0 commit comments