Do not honour the session-id, longer than 40 characters, instead create

new session-id in that case.
This commit is contained in:
Ashesh Vashi
2016-05-09 00:04:25 +05:30
parent b383c67fa5
commit e8b4bb909b
2 changed files with 3 additions and 1 deletions

View File

@@ -204,7 +204,7 @@ class ServerSideSessionInterface(SessionInterface):
Returns the SqliteSessionStorage object representing this session.
"""
sid = request.cookies.get(app.session_cookie_name)
if not sid:
if not sid or len(sid) > 40:
sid = str(uuid4())
return SqliteSessionStorage(self.directory, sid)