forked from MarseyWorld/MarseyWorld
sfdfsd
parent
c8fd124ac2
commit
0980658c37
|
@ -79,6 +79,7 @@ def check_for_alts(current_id):
|
|||
@limiter.limit("1/second")
|
||||
@limiter.limit("6/minute")
|
||||
def login_post():
|
||||
template = ''
|
||||
|
||||
username = request.values.get("username")
|
||||
|
||||
|
@ -91,7 +92,6 @@ def login_post():
|
|||
|
||||
if not account:
|
||||
time.sleep(random.uniform(0, 2))
|
||||
template = ''
|
||||
return render_template(f"{template}login.html", failed=True)
|
||||
|
||||
|
||||
|
@ -99,13 +99,11 @@ def login_post():
|
|||
|
||||
if not account.verifyPass(request.values.get("password")):
|
||||
time.sleep(random.uniform(0, 2))
|
||||
template = ''
|
||||
return render_template(f"{template}login.html", failed=True)
|
||||
|
||||
if account.mfa_secret:
|
||||
now = int(time.time())
|
||||
hash = generate_hash(f"{account.id}+{now}+2fachallenge")
|
||||
template = ''
|
||||
return render_template(f"{template}login_2fa.html",
|
||||
v=account,
|
||||
time=now,
|
||||
|
@ -126,7 +124,6 @@ def login_post():
|
|||
|
||||
if not account.validate_2fa(request.values.get("2fa_token", "").strip()):
|
||||
hash = generate_hash(f"{account.id}+{time}+2fachallenge")
|
||||
template = ''
|
||||
return render_template(f"{template}login_2fa.html",
|
||||
v=account,
|
||||
time=now,
|
||||
|
|
Loading…
Reference in New Issue