Skip to content
Snippets Groups Projects
Commit 0ddabcf9 authored by Julian's avatar Julian
Browse files

clear session on login, fixes #24

parent f7038695
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ def login(): ...@@ -31,6 +31,7 @@ def login():
if not user.is_in_group(current_app.config['ACL_SELFSERVICE_GROUP']): if not user.is_in_group(current_app.config['ACL_SELFSERVICE_GROUP']):
flash('You do not have access to this service') flash('You do not have access to this service')
return render_template('login.html', ref=request.values.get('ref')) return render_template('login.html', ref=request.values.get('ref'))
session.clear()
session['user_uid'] = user.uid session['user_uid'] = user.uid
session['logintime'] = datetime.datetime.now().timestamp() session['logintime'] = datetime.datetime.now().timestamp()
session['_csrf_token'] = secrets.token_hex(128) session['_csrf_token'] = secrets.token_hex(128)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment