Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Commit6251c4e
committed
feature#38954 [HttpFundation][FrameworkBundle] Deprecate the HEADER_X_FORWARDED_ALL constant (jderusse)
This PR was merged into the 5.2-dev branch.Discussion----------[HttpFundation][FrameworkBundle] Deprecate the HEADER_X_FORWARDED_ALL constant| Q | A| ------------- | ---| Branch? | 5.x| Bug fix? | no| New feature? | no| Deprecations? | yes| Tickets | -| License | MIT| Doc PR | TODOThe `HEADER_X_FORWARDED_ALL` implicitly trust the `x-forwarded-host` header, leading to possible host header attack (as warned in the [documentation](https://symfony.com/doc/current/reference/configuration/framework.html#trusted-hosts).)Moreover, this `HEADER_X_FORWARDED_ALL` does not really fowards **all** headers, as ti does not supports `X-Forwarded-Prefix` headers.This PR deprecate the constant and the new framework bundle configuration. It will be removed in 6.0. People have to use: either:- `Request::setTrustedProxies(['1.2.3.4'], Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO);`- `Request::setTrustedProxies(['1.2.3.4'], Request::HEADER_X_FORWARDED_TRAEFIK);`- `framework.trusted_headers: [x-forwarded-for, x-forwarded-host, x-forwarded-port, x-forwarded-proto]`Commits-------7cf4dd6 Deprecate HEADER_X_FORWARDED_ALL constantFile tree
10 files changed
+48
-28
lines changed- src/Symfony
- Bridge/Monolog/Tests/Processor
- Bundle/FrameworkBundle
- DependencyInjection
- Tests/DependencyInjection
- Component
- HttpFoundation
- Tests
- HttpKernel/Tests/HttpCache
10 files changed
+48
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2294 | 2294 | | |
2295 | 2295 | | |
2296 | 2296 | | |
2297 | | - | |
2298 | | - | |
2299 | | - | |
2300 | | - | |
2301 | | - | |
2302 | | - | |
2303 | | - | |
2304 | 2297 | | |
2305 | 2298 | | |
2306 | 2299 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
345 | | - | |
346 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
593 | 594 | | |
594 | 595 | | |
595 | 596 | | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
596 | 600 | | |
597 | 601 | | |
598 | 602 | | |
| |||
Lines changed: 31 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
867 | 870 | | |
868 | 871 | | |
869 | 872 | | |
870 | | - | |
| 873 | + | |
871 | 874 | | |
872 | 875 | | |
873 | 876 | | |
| |||
1091 | 1094 | | |
1092 | 1095 | | |
1093 | 1096 | | |
1094 | | - | |
| 1097 | + | |
1095 | 1098 | | |
1096 | 1099 | | |
1097 | 1100 | | |
| |||
1349 | 1352 | | |
1350 | 1353 | | |
1351 | 1354 | | |
1352 | | - | |
| 1355 | + | |
1353 | 1356 | | |
1354 | 1357 | | |
1355 | 1358 | | |
| |||
1830 | 1833 | | |
1831 | 1834 | | |
1832 | 1835 | | |
1833 | | - | |
| 1836 | + | |
1834 | 1837 | | |
1835 | 1838 | | |
1836 | 1839 | | |
| |||
1873 | 1876 | | |
1874 | 1877 | | |
1875 | 1878 | | |
1876 | | - | |
| 1879 | + | |
1877 | 1880 | | |
1878 | 1881 | | |
1879 | 1882 | | |
1880 | 1883 | | |
1881 | 1884 | | |
1882 | 1885 | | |
1883 | | - | |
| 1886 | + | |
1884 | 1887 | | |
1885 | 1888 | | |
1886 | 1889 | | |
1887 | 1890 | | |
1888 | 1891 | | |
1889 | 1892 | | |
1890 | | - | |
| 1893 | + | |
1891 | 1894 | | |
1892 | 1895 | | |
1893 | 1896 | | |
1894 | 1897 | | |
1895 | 1898 | | |
1896 | 1899 | | |
1897 | | - | |
| 1900 | + | |
1898 | 1901 | | |
1899 | 1902 | | |
1900 | 1903 | | |
1901 | 1904 | | |
1902 | 1905 | | |
1903 | 1906 | | |
1904 | | - | |
| 1907 | + | |
1905 | 1908 | | |
1906 | 1909 | | |
1907 | 1910 | | |
| |||
2377 | 2380 | | |
2378 | 2381 | | |
2379 | 2382 | | |
2380 | | - | |
| 2383 | + | |
2381 | 2384 | | |
2382 | 2385 | | |
2383 | 2386 | | |
| |||
2393 | 2396 | | |
2394 | 2397 | | |
2395 | 2398 | | |
2396 | | - | |
| 2399 | + | |
2397 | 2400 | | |
2398 | 2401 | | |
2399 | 2402 | | |
| |||
2464 | 2467 | | |
2465 | 2468 | | |
2466 | 2469 | | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
2467 | 2487 | | |
2468 | 2488 | | |
2469 | 2489 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1361 | 1361 | | |
1362 | 1362 | | |
1363 | 1363 | | |
1364 | | - | |
| 1364 | + | |
1365 | 1365 | | |
1366 | 1366 | | |
1367 | 1367 | | |
| |||
0 commit comments
Comments
(0)