From 3d2769621036f67c71f4974fcf16f75dd272329c Mon Sep 17 00:00:00 2001 From: Ben Rog-Wilhelm Date: Sat, 11 Jan 2025 12:14:50 -0600 Subject: [PATCH] Tweak a field name to hopefully slow some spambots. --- files/routes/login.py | 2 +- files/templates/login/sign_up.html | 2 +- files/tests/fixture_accounts.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/login.py b/files/routes/login.py index d8111f739..5b24572d7 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -245,7 +245,7 @@ def sign_up_post(v): now = int(time.time()) - username = request.values.get("username") + username = request.values.get("usernametwo") if not username: abort(400) diff --git a/files/templates/login/sign_up.html b/files/templates/login/sign_up.html index 6694ef937..76bc5cca2 100644 --- a/files/templates/login/sign_up.html +++ b/files/templates/login/sign_up.html @@ -22,7 +22,7 @@ {% if redirect %}{% endif %} {% if ref_user %}{% endif %} - + (optional) diff --git a/files/tests/fixture_accounts.py b/files/tests/fixture_accounts.py index 10514d941..ab4878372 100644 --- a/files/tests/fixture_accounts.py +++ b/files/tests/fixture_accounts.py @@ -25,7 +25,7 @@ class AccountsFixture: print(f"Signing up as {username}") signup_post_response = client.post("/signup", data={ - "username": username, + "usernametwo": username, "password": "password", "password_confirm": "password", "email": "",