File tree Expand file tree Collapse file tree 3 files changed +7
-56
lines changed
src/Symfony/Component/HttpFoundation Expand file tree Collapse file tree 3 files changed +7
-56
lines changed Original file line number Diff line number Diff line change 1
1
CHANGELOG
2
2
=========
3
3
4
+ 2.7.49
5
+ ------
6
+
7
+ * [ BC BREAK] Support for the IIS-only ` X_ORIGINAL_URL ` and ` X_REWRITE_URL `
8
+ HTTP headers has been dropped for security reasons.
9
+
4
10
2.6.0
5
11
-----
6
12
Original file line number Diff line number Diff line change @@ -1712,18 +1712,7 @@ protected function prepareRequestUri()
1712
1712
{
1713
1713
$ requestUri = '' ;
1714
1714
1715
- if ($ this ->headers ->has ('X_ORIGINAL_URL ' )) {
1716
- // IIS with Microsoft Rewrite Module
1717
- $ requestUri = $ this ->headers ->get ('X_ORIGINAL_URL ' );
1718
- $ this ->headers ->remove ('X_ORIGINAL_URL ' );
1719
- $ this ->server ->remove ('HTTP_X_ORIGINAL_URL ' );
1720
- $ this ->server ->remove ('UNENCODED_URL ' );
1721
- $ this ->server ->remove ('IIS_WasUrlRewritten ' );
1722
- } elseif ($ this ->headers ->has ('X_REWRITE_URL ' )) {
1723
- // IIS with ISAPI_Rewrite
1724
- $ requestUri = $ this ->headers ->get ('X_REWRITE_URL ' );
1725
- $ this ->headers ->remove ('X_REWRITE_URL ' );
1726
- } elseif ('1 ' == $ this ->server ->get ('IIS_WasUrlRewritten ' ) && '' != $ this ->server ->get ('UNENCODED_URL ' )) {
1715
+ if ('1 ' == $ this ->server ->get ('IIS_WasUrlRewritten ' ) && '' != $ this ->server ->get ('UNENCODED_URL ' )) {
1727
1716
// IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem)
1728
1717
$ requestUri = $ this ->server ->get ('UNENCODED_URL ' );
1729
1718
$ this ->server ->remove ('UNENCODED_URL ' );
Original file line number Diff line number Diff line change @@ -1769,52 +1769,8 @@ public function iisRequestUriProvider()
1769
1769
{
1770
1770
return array (
1771
1771
array (
1772
- array (
1773
- 'X_ORIGINAL_URL ' => '/foo/bar ' ,
1774
- ),
1775
- array (),
1776
- '/foo/bar ' ,
1777
- ),
1778
- array (
1779
- array (
1780
- 'X_REWRITE_URL ' => '/foo/bar ' ,
1781
- ),
1782
1772
array (),
1783
- '/foo/bar ' ,
1784
- ),
1785
- array (
1786
- array (),
1787
- array (
1788
- 'IIS_WasUrlRewritten ' => '1 ' ,
1789
- 'UNENCODED_URL ' => '/foo/bar ' ,
1790
- ),
1791
- '/foo/bar ' ,
1792
- ),
1793
- array (
1794
- array (
1795
- 'X_ORIGINAL_URL ' => '/foo/bar ' ,
1796
- ),
1797
- array (
1798
- 'HTTP_X_ORIGINAL_URL ' => '/foo/bar ' ,
1799
- ),
1800
- '/foo/bar ' ,
1801
- ),
1802
- array (
1803
- array (
1804
- 'X_ORIGINAL_URL ' => '/foo/bar ' ,
1805
- ),
1806
- array (
1807
- 'IIS_WasUrlRewritten ' => '1 ' ,
1808
- 'UNENCODED_URL ' => '/foo/bar ' ,
1809
- ),
1810
- '/foo/bar ' ,
1811
- ),
1812
- array (
1813
- array (
1814
- 'X_ORIGINAL_URL ' => '/foo/bar ' ,
1815
- ),
1816
1773
array (
1817
- 'HTTP_X_ORIGINAL_URL ' => '/foo/bar ' ,
1818
1774
'IIS_WasUrlRewritten ' => '1 ' ,
1819
1775
'UNENCODED_URL ' => '/foo/bar ' ,
1820
1776
),
You can’t perform that action at this time.
0 commit comments