diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index bc0ec0ae..42799b94 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -1154,6 +1154,17 @@ class UserController extends BaseController { $user = json_decode(base64_decode(file_get_contents("php://input")), true); + + $role_name = $user['role_name']; + $encode = mb_detect_encoding($user['role_name'], array('UTF-8','GB2312','GBK')); + if($encode == "UTF-8"){ + $role_name = @iconv('UTF-8','GB18030',$user['role_name']); + } + + if(strlen($role_name) > 16){ + $this -> set_message(1001, "fail", "名称过长"); + } + if (empty($user)) { $this -> set_message(1001, "fail", "操作数据不能为空");