mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
fix: Ensure anonymous session timeout is applied when expiration is not an integer or is zero.
This commit is contained in:
@@ -96,6 +96,10 @@ class RedisSessionStore(SessionStore):
|
|||||||
"utf-8"
|
"utf-8"
|
||||||
)
|
)
|
||||||
if self.redis.set(key, data):
|
if self.redis.set(key, data):
|
||||||
|
if type(expiration) != int:
|
||||||
|
expiration = DEFAULT_SESSION_TIMEOUT_ANONYMOUS
|
||||||
|
if expiration == 0:
|
||||||
|
expiration = DEFAULT_SESSION_TIMEOUT_ANONYMOUS
|
||||||
return self.redis.expire(key, expiration)
|
return self.redis.expire(key, expiration)
|
||||||
|
|
||||||
def delete(self, session):
|
def delete(self, session):
|
||||||
|
|||||||
Reference in New Issue
Block a user