瀏覽代碼

判断是否传参

peng 1 年之前
父節點
當前提交
a8c62fdbb7
共有 1 個文件被更改,包括 1 次插入1 次删除
  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'])