From 4b68d8ea33987bd74f169d7a3c6893c4229ee22b Mon Sep 17 00:00:00 2001 From: ping <1017253325@qq.com> Date: Tue, 12 May 2026 15:57:25 +0800 Subject: [PATCH] update --- b/customer/registerUser.dspy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/b/customer/registerUser.dspy b/b/customer/registerUser.dspy index fb8581c..3a97735 100644 --- a/b/customer/registerUser.dspy +++ b/b/customer/registerUser.dspy @@ -26,8 +26,9 @@ async def registerUser(ns): ns['username'] = ns['mobile'] if ns.get('password'): - if len(ns.get('password')) < 6: - return {'status': False, 'msg': '密码必须6位数以上'} + # 至少8位,包含大小写字母、特殊字符、数字 + if len(ns.get('password')) < 8 or not re.search(r'[a-zA-Z]', ns.get('password')) or not re.search(r'[0-9]', ns.get('password')) or not re.search(r'[!@#$%^&*()_+{}|:"<>?]', ns.get('password')): + return {'status': False, 'msg': '密码至少8位,包含大小写字母、特殊字符、数字'} if not ns.get('codeid'): return {'status': False, 'msg': '验证码ID不能为空'}