Parcourir la source

oauth/perfect接口添加解密逻辑1

tanghongbin il y a 5 ans
Parent
commit
fb4bb078f4
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      Controller/UserController.py

+ 4 - 1
Controller/UserController.py

@@ -2429,7 +2429,10 @@ class OauthPerfectView(TemplateView):
         tko = TokenObject(token)
         if password is None or authcode is None:
             return response.json(444, 'password,authcode')
-        authcode = authcode.strip()
+        authcode = CommonService.decode_data(authcode.strip())
+        if authcode is None:
+            return response.json(444, 'password,authcode')
+
         password = CommonService.decode_data(password.strip())
         if password is None:
             return response.json(444, 'password,authcode')