mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
10739 - Multiple slashes at the end of route should not be accepted as valid url
This commit is contained in:
@ -242,6 +242,11 @@ class UrlManager extends Component
|
||||
|
||||
Yii::trace('No matching URL rules. Using default URL parsing logic.', __METHOD__);
|
||||
|
||||
// Ensure, that $pathInfo does not end with more than one slash.
|
||||
if (strlen($pathInfo) > 1 && substr_compare($pathInfo, '//', -2, 2) === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$suffix = (string) $this->suffix;
|
||||
if ($suffix !== '' && $pathInfo !== '') {
|
||||
$n = strlen($this->suffix);
|
||||
|
Reference in New Issue
Block a user