Browse Source

修改密码判断密码长度

locky 3 năm trước cách đây
mục cha
commit
7903196b4e
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      Controller/UserController.py

+ 2 - 2
Controller/UserController.py

@@ -425,8 +425,8 @@ class v3ChangePwdView(TemplateView):
         except Exception as e:
         except Exception as e:
             return response.json(111)
             return response.json(111)
         else:
         else:
-            if oldPwd is None and newPwd is None:
-                return response.json(800)
+            if oldPwd is None or newPwd is None or len(newPwd) < 6:
+                return response.json(111)
             tko = TokenObject(token)
             tko = TokenObject(token)
             response.lang = tko.lang
             response.lang = tko.lang
             if tko.code != 0:
             if tko.code != 0: