mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-23 12:10:54 +08:00
Fixed URL parsing so it's now properly giving 404 for URLs like http://example.com//////site/about
This commit is contained in:
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user