浏览代码

修改密码判断密码长度

locky 3 年之前
父节点
当前提交
7903196b4e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Controller/UserController.py

+ 2 - 2
Controller/UserController.py

@@ -425,8 +425,8 @@ class v3ChangePwdView(TemplateView):
         except Exception as e:
             return response.json(111)
         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)
             response.lang = tko.lang
             if tko.code != 0: