Browse Source

优化token数据验证

master
wanghongjun 3 years ago
parent
commit
0a3feb7572
  1. 2
      source/application/api/controller/pass/Create.php

2
source/application/api/controller/pass/Create.php

@ -38,7 +38,7 @@ class Create extends Controller
if (!$data = $this->request->param('data')) {
throw new BaseException(['msg' => '缺少必要的参数:data']);
} else {
$data = json_decode(html_entity_decode($data),true);
$data = json_decode(html_entity_decode(base64_decode($data)),true);
if (empty($data)) throw new BaseException(['msg' => '参数为空:data']);
if (!is_array($data)) throw new BaseException(['msg' => '数据有误:data']);
}

Loading…
Cancel
Save