forked from rDrama/rDrama
fggf
parent
93502b7eff
commit
f18f6be588
|
@ -267,14 +267,6 @@ def sign_up_post(v):
|
|||
email = email.strip()
|
||||
if not email: email = None
|
||||
|
||||
#counteract gmail username+2 and extra period tricks - convert submitted email to actual inbox
|
||||
if email and email.endswith("@gmail.com"):
|
||||
email=email.split('@')[0]
|
||||
email=email.split('+')[0]
|
||||
email=email.replace('.','')
|
||||
email=f"{email}@gmail.com"
|
||||
|
||||
|
||||
existing_account = get_user(username, graceful=True)
|
||||
if existing_account and existing_account.reserved:
|
||||
return redirect(existing_account.permalink)
|
||||
|
@ -380,12 +372,15 @@ def post_forgot():
|
|||
|
||||
email=email.replace("_","\_")
|
||||
|
||||
if email.endswith("@gmail.com"):
|
||||
user = g.db.query(User).filter(
|
||||
User.username.ilike(username),
|
||||
User.email.ilike(email)).first()
|
||||
|
||||
if not user and email.endswith("@gmail.com"):
|
||||
email=email.split('@')[0]
|
||||
email=email.split('+')[0]
|
||||
email=email.replace('.','')
|
||||
email=f"{email}@gmail.com"
|
||||
|
||||
user = g.db.query(User).filter(
|
||||
User.username.ilike(username),
|
||||
User.email.ilike(email)).first()
|
||||
|
@ -501,12 +496,11 @@ def request_2fa_disable():
|
|||
|
||||
|
||||
email=request.form.get("email")
|
||||
if email and email.endswith("@gmail.com"):
|
||||
if email != user.email and email.endswith("@gmail.com"):
|
||||
email=email.split('@')[0]
|
||||
email=email.split('+')[0]
|
||||
email=email.replace('.','')
|
||||
email=f"{email}@gmail.com"
|
||||
|
||||
if email != user.email:
|
||||
return render_template("message.html",
|
||||
title="Removal request received",
|
||||
|
|
|
@ -240,15 +240,8 @@ def settings_security_post(v):
|
|||
escape("Invalid password."))
|
||||
|
||||
new_email = request.form.get("new_email","").strip()
|
||||
#counteract gmail username+2 and extra period tricks - convert submitted email to actual inbox
|
||||
if new_email.endswith("@gmail.com"):
|
||||
gmail_username=new_email.split('@')[0]
|
||||
gmail_username=gmail_username.split("+")[0]
|
||||
gmail_username=gmail_username.replace('.','')
|
||||
new_email=f"{gmail_username}@gmail.com"
|
||||
if new_email == v.email:
|
||||
return redirect("/settings/security?error=" +
|
||||
escape("That email is already yours!"))
|
||||
return redirect("/settings/security?error=That email is already yours!")
|
||||
|
||||
# check to see if email is in use
|
||||
existing = g.db.query(User).filter(User.id != v.id,
|
||||
|
|
Loading…
Reference in New Issue