Route.class.php中的checkUrlMatch方法有bug

浏览:589 发布日期:2016/09/17
3.2.3 - 严重 - 已处理
url:
index.php/news/2016/09

config.php的配置如下:'URL_ROUTER_ON'   => true,//开启路由
'URL_ROUTE_RULES' => array(
'news/:year\d|strip_whitespace/:month\d/[:day]'=>'home/News/archive?year=:1&month=:2',
)
ThinkPHP\Library\Think\Route.class.php
109行$val   =   substr($val,1,$pos-1);会导致 117行 的 $name 的值为为"ear" 正常的应该为 "year",
此bug会导致错误的返回结果


注意"ear" 、 "year"




评论()
后面还有条评论,点击查看>>