mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-04 06:37:55 +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:
@ -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