If the user has a token we don't recognize, give them a new one.
This commit is contained in:
parent
55e1281774
commit
7352d1e141
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ class SessionManager:
|
|||
def wrapped(*args, **kwargs):
|
||||
# Inject new token so the function doesn't know the difference
|
||||
token = request.cookies.get('etiquette_session', None)
|
||||
if not token:
|
||||
if not token or token not in self.sessions:
|
||||
token = _generate_token()
|
||||
request.cookies = dict(request.cookies)
|
||||
request.cookies['etiquette_session'] = token
|
||||
|
|
Loading…
Reference in a new issue