Quellcode durchsuchen

判断是否传参

peng vor 1 Jahr
Ursprung
Commit
a8c62fdbb7
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      Controller/UserController.py

+ 1 - 1
Controller/UserController.py

@@ -2275,7 +2275,7 @@ class v3LoginView(TemplateView):
         if password_version == 'V1':
             check_flag = check_password(password, users['password'])
         else:
-            if not iterations and salt:
+            if not all([iterations, salt]):
                 return response.json(111)
             password = "%s$%d$%s$%s" % ("pbkdf2_sha256", int(iterations), salt, password)
             check_flag = CommonService.check_password(password, users['password'])