Просмотр исходного кода

oauth/perfect接口添加解密逻辑

tanghongbin 5 лет назад
Родитель
Сommit
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)