Commit cd205e4
committed
bug #62324 [HttpFoundation] Fix parsing hosts and schemes in URLs (nicolas-grekas)
This PR was merged into the 6.4 branch.
Discussion
----------
[HttpFoundation] Fix parsing hosts and schemes in URLs
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
This PR implements stricter parsing of URL hosts and schemes.
It hardens the codebase by making our interpretation or URLs closer to [the spec](https://url.spec.whatwg.org/).
This should help close potential semantic gaps between different layers of infrastructure.
The robustness principle is dead.
This topic has been raised by `@zer0yu` `@P3ngu1nW` `@9vvert` - thanks to them!
Commits
-------
8302e52 [HttpFoundation] Fix parsing hosts and schemes in URLsFile tree
3 files changed
+99
-17
lines changed- src/Symfony/Component
- HttpFoundation
- Tests
- HttpKernel/Tests/EventListener
3 files changed
+99
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
354 | 357 | | |
355 | 358 | | |
356 | 359 | | |
357 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
358 | 369 | | |
359 | 370 | | |
360 | 371 | | |
| |||
1151 | 1162 | | |
1152 | 1163 | | |
1153 | 1164 | | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
| 1165 | + | |
| 1166 | + | |
1158 | 1167 | | |
1159 | 1168 | | |
1160 | 1169 | | |
| |||
2135 | 2144 | | |
2136 | 2145 | | |
2137 | 2146 | | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
2138 | 2164 | | |
Lines changed: 67 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2237 | 2237 | | |
2238 | 2238 | | |
2239 | 2239 | | |
2240 | | - | |
2241 | | - | |
2242 | | - | |
2243 | | - | |
| 2240 | + | |
2244 | 2241 | | |
| 2242 | + | |
2245 | 2243 | | |
2246 | 2244 | | |
2247 | 2245 | | |
| |||
2284 | 2282 | | |
2285 | 2283 | | |
2286 | 2284 | | |
2287 | | - | |
2288 | | - | |
2289 | | - | |
2290 | | - | |
2291 | | - | |
2292 | | - | |
2293 | | - | |
2294 | | - | |
2295 | 2285 | | |
2296 | 2286 | | |
2297 | 2287 | | |
| |||
2667 | 2657 | | |
2668 | 2658 | | |
2669 | 2659 | | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
2670 | 2725 | | |
2671 | 2726 | | |
2672 | 2727 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
0 commit comments