fsddsf
This commit is contained in:
parent
cb87196eee
commit
470dd39ea5
1 changed files with 4 additions and 8 deletions
|
@ -91,8 +91,7 @@ def login_post():
|
||||||
|
|
||||||
if not account:
|
if not account:
|
||||||
time.sleep(random.uniform(0, 2))
|
time.sleep(random.uniform(0, 2))
|
||||||
if v and v.oldsite: template = ''
|
template = ''
|
||||||
else: template = 'CHRISTMAS/'
|
|
||||||
return render_template(f"{template}login.html", failed=True)
|
return render_template(f"{template}login.html", failed=True)
|
||||||
|
|
||||||
|
|
||||||
|
@ -100,15 +99,13 @@ def login_post():
|
||||||
|
|
||||||
if not account.verifyPass(request.values.get("password")):
|
if not account.verifyPass(request.values.get("password")):
|
||||||
time.sleep(random.uniform(0, 2))
|
time.sleep(random.uniform(0, 2))
|
||||||
if v and v.oldsite: template = ''
|
template = ''
|
||||||
else: template = 'CHRISTMAS/'
|
|
||||||
return render_template(f"{template}login.html", failed=True)
|
return render_template(f"{template}login.html", failed=True)
|
||||||
|
|
||||||
if account.mfa_secret:
|
if account.mfa_secret:
|
||||||
now = int(time.time())
|
now = int(time.time())
|
||||||
hash = generate_hash(f"{account.id}+{now}+2fachallenge")
|
hash = generate_hash(f"{account.id}+{now}+2fachallenge")
|
||||||
if v and v.oldsite: template = ''
|
template = ''
|
||||||
else: template = 'CHRISTMAS/'
|
|
||||||
return render_template(f"{template}login_2fa.html",
|
return render_template(f"{template}login_2fa.html",
|
||||||
v=account,
|
v=account,
|
||||||
time=now,
|
time=now,
|
||||||
|
@ -129,8 +126,7 @@ def login_post():
|
||||||
|
|
||||||
if not account.validate_2fa(request.values.get("2fa_token", "").strip()):
|
if not account.validate_2fa(request.values.get("2fa_token", "").strip()):
|
||||||
hash = generate_hash(f"{account.id}+{time}+2fachallenge")
|
hash = generate_hash(f"{account.id}+{time}+2fachallenge")
|
||||||
if v and v.oldsite: template = ''
|
template = ''
|
||||||
else: template = 'CHRISTMAS/'
|
|
||||||
return render_template(f"{template}login_2fa.html",
|
return render_template(f"{template}login_2fa.html",
|
||||||
v=account,
|
v=account,
|
||||||
time=now,
|
time=now,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue