1 个管道
的构建
通过
耗费
5 秒
Merge remote-tracking branch 'origin/master'
正在显示
2 个修改的文件
包含
69 行增加
和
2 行删除
1 | <?php return array ( | 1 | <?php return array ( |
2 | + '子分类/:id' => | ||
3 | + array ( | ||
4 | + 0 => 'portal/Article/index?cid=21', | ||
5 | + 1 => | ||
6 | + array ( | ||
7 | + ), | ||
8 | + 2 => | ||
9 | + array ( | ||
10 | + 'id' => '\d+', | ||
11 | + 'cid' => '\d+', | ||
12 | + ), | ||
13 | + ), | ||
14 | + '三级分类2/:id' => | ||
15 | + array ( | ||
16 | + 0 => 'portal/Article/index?cid=22', | ||
17 | + 1 => | ||
18 | + array ( | ||
19 | + ), | ||
20 | + 2 => | ||
21 | + array ( | ||
22 | + 'id' => '\d+', | ||
23 | + 'cid' => '\d+', | ||
24 | + ), | ||
25 | + ), | ||
26 | + '子分嗯呢/:id' => | ||
27 | + array ( | ||
28 | + 0 => 'portal/Article/index?cid=23', | ||
29 | + 1 => | ||
30 | + array ( | ||
31 | + ), | ||
32 | + 2 => | ||
33 | + array ( | ||
34 | + 'id' => '\d+', | ||
35 | + 'cid' => '\d+', | ||
36 | + ), | ||
37 | + ), | ||
38 | + '子分类' => | ||
39 | + array ( | ||
40 | + 0 => 'portal/List/index?id=21', | ||
41 | + 1 => | ||
42 | + array ( | ||
43 | + ), | ||
44 | + 2 => | ||
45 | + array ( | ||
46 | + 'id' => '\d+', | ||
47 | + ), | ||
48 | + ), | ||
49 | + '三级分类2' => | ||
50 | + array ( | ||
51 | + 0 => 'portal/List/index?id=22', | ||
52 | + 1 => | ||
53 | + array ( | ||
54 | + ), | ||
55 | + 2 => | ||
56 | + array ( | ||
57 | + 'id' => '\d+', | ||
58 | + ), | ||
59 | + ), | ||
60 | + '子分嗯呢' => | ||
61 | + array ( | ||
62 | + 0 => 'portal/List/index?id=23', | ||
63 | + 1 => | ||
64 | + array ( | ||
65 | + ), | ||
66 | + 2 => | ||
67 | + array ( | ||
68 | + 'id' => '\d+', | ||
69 | + ), | ||
70 | + ), | ||
2 | ); | 71 | ); |
simplewind/thinkphp/library/think/App.php
100644 → 100755
@@ -370,12 +370,10 @@ class App | @@ -370,12 +370,10 @@ class App | ||
370 | 370 | ||
371 | // 是否自动转换控制器和操作名 | 371 | // 是否自动转换控制器和操作名 |
372 | $convert = is_bool($convert) ? $convert : $config['url_convert']; | 372 | $convert = is_bool($convert) ? $convert : $config['url_convert']; |
373 | - | ||
374 | // 获取控制器名 | 373 | // 获取控制器名 |
375 | $controller = strip_tags($result[1] ?: $config['default_controller']); | 374 | $controller = strip_tags($result[1] ?: $config['default_controller']); |
376 | $controller = $convert ? strtolower($controller) : $controller; | 375 | $controller = $convert ? strtolower($controller) : $controller; |
377 | 376 | ||
378 | - //修改远程执行漏洞问题 | ||
379 | if (!preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) { | 377 | if (!preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) { |
380 | throw new HttpException(404, 'controller not exists:' . $controller); | 378 | throw new HttpException(404, 'controller not exists:' . $controller); |
381 | } | 379 | } |
-
请 注册 或 登录 后发表评论