去除控制器名的检测

This commit is contained in:
thinkphp
2016-06-24 17:13:31 +08:00
parent 75f855757b
commit 1e21d9af34

View File

@@ -282,12 +282,6 @@ class App
$actionName = strip_tags($result[2] ?: $config['default_action']);
$actionName = $convert ? strtolower($actionName) : $actionName;
// 执行操作
if (!preg_match('/^[A-Za-z](\/|\.|\w)*$/', $controller)) {
// 安全检测
throw new \InvalidArgumentException('illegal controller name:' . $controller);
}
// 设置当前请求的控制器、操作
$request->controller($controller)->action($actionName);