Skip to content

Commit

Permalink
Fixes yiisoft#4234: CVE-2018-14773. Drop support for HTTP_X_REWRITE_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
kenguest authored and samdark committed Dec 30, 2018
1 parent 628b3db commit 037832e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Version 1.1.21 under development

- Bug #4220: Fixed PHP 7.2 incompatibility caused by the use of `create_function` in CHttpRequest (martinpetrasch)
- Bug #4229: Remove deprecation errors from framework/web/js/source/jquery.yiiactiveform.js when using jQuery 3.1.1 (kenguest)
- Bug #4234: CVE-2018-14773. Drop support for HTTP_X_REWRITE_URL (kenguest)

Version 1.1.20 July 6, 2018
---------------------------
Expand Down
4 changes: 1 addition & 3 deletions framework/web/CHttpRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,7 @@ public function getRequestUri()
{
if($this->_requestUri===null)
{
if(isset($_SERVER['HTTP_X_REWRITE_URL'])) // IIS
$this->_requestUri=$_SERVER['HTTP_X_REWRITE_URL'];
elseif(isset($_SERVER['REQUEST_URI']))
if(isset($_SERVER['REQUEST_URI']))
{
$this->_requestUri=$_SERVER['REQUEST_URI'];
if(!empty($_SERVER['HTTP_HOST']))
Expand Down
6 changes: 2 additions & 4 deletions framework/yiilite.php
Original file line number Diff line number Diff line change
Expand Up @@ -2553,9 +2553,7 @@ public function getRequestUri()
{
if($this->_requestUri===null)
{
if(isset($_SERVER['HTTP_X_REWRITE_URL'])) // IIS
$this->_requestUri=$_SERVER['HTTP_X_REWRITE_URL'];
elseif(isset($_SERVER['REQUEST_URI']))
if(isset($_SERVER['REQUEST_URI']))
{
$this->_requestUri=$_SERVER['REQUEST_URI'];
if(!empty($_SERVER['HTTP_HOST']))
Expand Down Expand Up @@ -10729,4 +10727,4 @@ interface ILogFilter
{
public function filter(&$logs);
}
?>
?>

0 comments on commit 037832e

Please sign in to comment.