作者 sgj
1 个管道 的构建 通过 耗费 5 秒

Merge remote-tracking branch 'origin/master'

<?php return array (
'子分类/:id' =>
array (
0 => 'portal/Article/index?cid=21',
1 =>
array (
),
2 =>
array (
'id' => '\d+',
'cid' => '\d+',
),
),
'三级分类2/:id' =>
array (
0 => 'portal/Article/index?cid=22',
1 =>
array (
),
2 =>
array (
'id' => '\d+',
'cid' => '\d+',
),
),
'子分嗯呢/:id' =>
array (
0 => 'portal/Article/index?cid=23',
1 =>
array (
),
2 =>
array (
'id' => '\d+',
'cid' => '\d+',
),
),
'子分类' =>
array (
0 => 'portal/List/index?id=21',
1 =>
array (
),
2 =>
array (
'id' => '\d+',
),
),
'三级分类2' =>
array (
0 => 'portal/List/index?id=22',
1 =>
array (
),
2 =>
array (
'id' => '\d+',
),
),
'子分嗯呢' =>
array (
0 => 'portal/List/index?id=23',
1 =>
array (
),
2 =>
array (
'id' => '\d+',
),
),
);
\ No newline at end of file
... ...
... ... @@ -370,12 +370,10 @@ class App
// 是否自动转换控制器和操作名
$convert = is_bool($convert) ? $convert : $config['url_convert'];
// 获取控制器名
$controller = strip_tags($result[1] ?: $config['default_controller']);
$controller = $convert ? strtolower($controller) : $controller;
//修改远程执行漏洞问题
if (!preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) {
throw new HttpException(404, 'controller not exists:' . $controller);
}
... ...