diff --git a/config/filter.php b/config/filter.php index f146ba2068..868577e010 100644 --- a/config/filter.php +++ b/config/filter.php @@ -197,3 +197,4 @@ $filter->upgrade->license->get['agree'] = 'equal::true'; $filter->user->login->get['account'] = 'account'; $filter->user->login->get['lang'] = 'reg::lang'; $filter->user->login->get['password'] = 'reg::any'; +$filter->user->edit->get['from'] = 'reg::word'; diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 494b62ed4c..aafd15a72a 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1715,6 +1715,8 @@ class baseRouter for($i = 2; $i < $itemCount; $i ++) { $key = key($defaultParams); // Get key from the $defaultParams. + if(empty($key)) continue; + $params[$key] = str_replace('.', '-', $items[$i]); next($defaultParams); } @@ -1776,6 +1778,7 @@ class baseRouter { $valueRule = $filter->{$this->moduleName}->{$this->methodName}->paramValue[$param]; } + if($value and !validater::checkByRule($value, $valueRule)) die('Bad Request!'); } diff --git a/module/company/view/browse.html.php b/module/company/view/browse.html.php index 6374de980f..d800ba5003 100644 --- a/module/company/view/browse.html.php +++ b/module/company/view/browse.html.php @@ -77,7 +77,7 @@ js::set('confirmDelete', $lang->user->confirmDelete); visits;?> id&from=company", '', 'list'); + common::printIcon('user', 'edit', "userID=$user->id&from=company", '', 'list'); if(strpos($this->app->company->admins, ",{$user->account},") === false and common::hasPriv('user', 'delete')) { echo html::a($this->createLink('user', 'delete', "userID=$user->id"), '', '', "title='{$lang->user->delete}' class='btn-icon iframe'");