Browse Source

Fixed URL parsing so it's now properly giving 404 for URLs like `http://example.com//////site/about`

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
bee82b29ad
  1. 1
      framework/CHANGELOG.md
  2. 6
      framework/yii/web/Request.php

1
framework/CHANGELOG.md

@ -28,6 +28,7 @@ Yii Framework 2 Change Log
- Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
- Bug: Fixed issue with tabular input on ActiveField::radio() and ActiveField::checkbox() (jom)
- Bug: Fixed the issue that query cache returns the same data for the same SQL but different query methods (qiangxue)
- Bug: Fixed URL parsing so it's now properly giving 404 for URLs like `http://example.com//////site/about` (samdark)
- Enh #46: Added Image extension based on [Imagine library](http://imagine.readthedocs.org) (tonydspaniard)
- Enh #364: Improve Inflector::slug with `intl` transliteration. Improved transliteration char map. (tonydspaniard)
- Enh #797: Added support for validating multiple columns by `UniqueValidator` and `ExistValidator` (qiangxue)

6
framework/yii/web/Request.php

@ -584,7 +584,11 @@ class Request extends \yii\base\Request
throw new InvalidConfigException('Unable to determine the path info of the current request.');
}
return ltrim($pathInfo, '/');
if ($pathInfo[0] === '/') {
$pathInfo = substr($pathInfo, 1);
}
return $pathInfo;
}
/**

Loading…
Cancel
Save