* fix and adjust code.

This commit is contained in:
wangyidong
2016-06-03 16:43:42 +08:00
parent 1a68eb4249
commit 52882750dc
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -1531,7 +1531,7 @@ class baseRouter
foreach($passedParams as $param => $value)
{
if(preg_match('/[^a-zA-Z0-9_\.]/', $param)) die('Bad Request!');
if(preg_match('/[^a-zA-Z0-9=_,`#+\/\.%\|\x7f-\xff]/', trim($value))) die('Bad Request!');
if(preg_match('/[^a-zA-Z0-9=_,`#+\^\/\.%\|\x7f-\xff]/', trim($value))) die('Bad Request!');
}
unset($passedParams['onlybody']);
+13
View File
@@ -297,6 +297,19 @@ class userModel extends model
$data[$i]->address = $users->address[$i];
$data[$i]->zipcode = $users->zipcode[$i];
/* Change for append field, such as feedback.*/
if(!empty($this->config->user->batchAppendFields))
{
$appendFields = explode(',', $this->config->user->batchAppendFields);
foreach($appendFields as $appendField)
{
if(empty($appendField)) continue;
if(!isset($users->$appendField)) continue;
$fieldList = $users->$appendField;
$data[$i]->$appendField = $fieldList[$i];
}
}
$accounts[$i] = $data[$i]->account;
$prev['dept'] = $data[$i]->dept;
$prev['role'] = $data[$i]->role;