diff --git a/app/account_service.py b/app/account_service.py index 1717889..e572bd0 100644 --- a/app/account_service.py +++ b/app/account_service.py @@ -5,11 +5,6 @@ from Login import check_username_availability, verify_user, add_user, get_expiry # 初始化蓝图 accountService = Blueprint("accountService", __name__) -# 确认密码和输入密码是否一致 -def verify_passverified(password,password2): - if(password==password2): - return True - ### Sign-up, login, logout ### @accountService.route("/signup", methods=['GET', 'POST']) def signup(): @@ -33,13 +28,12 @@ def signup(): available = check_username_availability(username) - verified_2 = verify_passverified(password, password2) # 比较“密码”与“确认密码” if not available: # 用户名不可用 flash('用户名 %s 已经被注册。' % (username)) return render_template('signup.html') elif len(password.strip()) < 4: # 密码过短 return '密码过于简单。' - elif not verified_2: + elif password != password2: return '确认密码与输入密码不一致!' else: # 添加账户信息 add_user(username, password) diff --git a/requirements.txt b/requirements.txt index 8552794..2746a3b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -Flask==2.1.0 +Flask==1.1.2 selenium==3.141.0 PyYAML~=6.0