浏览代码

oauth/perfect接口添加解密逻辑

tanghongbin 5 年之前
父节点
当前提交
1471388890
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      Controller/UserController.py

+ 3 - 2
Controller/UserController.py

@@ -2425,13 +2425,14 @@ class OauthPerfectView(TemplateView):
         password = request_dict.get('password', None)
         authcode = request_dict.get('authcode', None)
         token = request_dict.get('token', None)
-        print(token)
         token = request_dict.get('token')
         tko = TokenObject(token)
         if password is None or authcode is None:
             return response.json(444, 'password,authcode')
         authcode = authcode.strip()
-        password = password.strip()
+        password = CommonService.decode_data(password.strip())
+        if password is None:
+            return response.json(444, 'password,authcode')
         if phone is not None:
             phone = phone.strip()
             return self.do_phone(tko, phone, authcode, password, response)