dever 7 years ago
parent
commit
d8e3f89763
2 changed files with 2 additions and 0 deletions
  1. 1 0
      tm/lib/Controller/API/SetUser.class.php
  2. 1 0
      tm/lib/Controller/Passport.class.php

+ 1 - 0
tm/lib/Controller/API/SetUser.class.php

@@ -86,6 +86,7 @@ class SetUser extends Controller {
 		
 		// 1.获取传递来的相关信息
 		$info ['nickname'] = urldecode($this->params ['nickname']);
+		$info ['nickname'] = preg_replace('/[\x{10000}-\x{10FFFF}]/u', '', $info ['nickname']);
 		$info ['headimgurl'] = urldecode($this->params ['headimgurl']);
 		$info ['passport_uid'] = $this->params ['uid'];
 		$cas_uid = $this->params['cas_uid'];

+ 1 - 0
tm/lib/Controller/Passport.class.php

@@ -56,6 +56,7 @@ class Passport extends Controller{
         //echo $this->config['url'] . "\r\n";
 		//print_r($param);
 
+        $param['tokenId'] = preg_replace('/[\x{10000}-\x{10FFFF}]/u', '', $param['tokenId']);
         $data = $this->httpPost($host, $param);
 
         $data = json_decode($data, true);