fix: admin auth UX, password policy, deps, db pool

This commit is contained in:
2025-12-17 23:53:11 +08:00
parent 9028f7e272
commit 5851120f87
6 changed files with 46 additions and 18 deletions

View File

@@ -43,6 +43,10 @@ def register():
if not username or not password:
return jsonify({"error": "用户名和密码不能为空"}), 400
is_valid, error_msg = validate_password(password)
if not is_valid:
return jsonify({"error": error_msg}), 400
client_ip = get_client_ip()
allowed, error_msg = check_ip_rate_limit(client_ip)