10739 - Multiple slashes at the end of route should not be accepted as valid url

This commit is contained in:
Andrew Nester
2016-02-05 12:39:57 +03:00
parent a9bb31c4c0
commit fecd4dcfa5
3 changed files with 49 additions and 0 deletions

View File

@ -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);