Skip to content

Commit

Permalink
bug fix: sessions being unset as permanent
Browse files Browse the repository at this point in the history
  • Loading branch information
jdabtieu committed Oct 6, 2022
1 parent 99f81bb commit 482dc79
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def dl(filename):
def login():
# Forget user id
session.clear()
session.permanent = True # Have to re-set this after clear

if request.method == "GET":
return render_template("auth/login.html", site_key=app.config['HCAPTCHA_SITE'])
Expand Down Expand Up @@ -463,8 +464,6 @@ def toggle2fa():
@csrf.exempt
@app.route("/forgotpassword", methods=["GET", "POST"])
def forgotpassword():
session.clear()

if request.method == "GET":
return render_template("auth/forgotpassword.html",
site_key=app.config['HCAPTCHA_SITE'])
Expand Down

0 comments on commit 482dc79

Please sign in to comment.