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

@ -186,6 +186,8 @@ SESSION_DB_PATH = os.path.join(
'sessions'
)
SESSION_COOKIE_NAME = 'pga4_session'
##########################################################################
# Mail server settings
##########################################################################

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)