From 117f155ac0033693e2b006694db20100b880d3c8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 23 Nov 2021 23:03:20 +0200 Subject: [PATCH] dsffsd --- files/routes/login.py | 7 +++++++ files/routes/settings.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/files/routes/login.py b/files/routes/login.py index 983620149..5b90f314b 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -271,6 +271,13 @@ def sign_up_post(v): email = request.values.get("email") email = email.strip() + + if email.endswith("@gmail.com"): + email=email.split('@')[0] + email=email.split('+')[0] + email=email.replace('.','') + email=f"{email}@gmail.com" + if not email: email = None existing_account = get_user(username, graceful=True) diff --git a/files/routes/settings.py b/files/routes/settings.py index 317059a94..ad8f79ded 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -587,6 +587,13 @@ def settings_security_post(v): escape("Invalid password.")) new_email = request.values.get("new_email","").strip() + + if new_email.endswith("@gmail.com"): + new_email=new_email.split('@')[0] + new_email=new_email.split('+')[0] + new_email=new_email.replace('.','') + new_email=f"{new_email}@gmail.com" + if new_email == v.email: return redirect("/settings/security?error=That email is already yours!")