Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expired session leads to 'ERR invalid expire time in set' #321

Closed
baumgarb opened this issue Apr 20, 2021 · 0 comments
Closed

Expired session leads to 'ERR invalid expire time in set' #321

baumgarb opened this issue Apr 20, 2021 · 0 comments

Comments

@baumgarb
Copy link
Contributor

If for whatever reason a session has a cookie with an expires in the past then a call to set results in a negative TTL that's calculated which in turn leads to Redis throwing an error ERR invalid expire time in set.

Suggestion: the set method could check for the TTL it calculates and if it results in a negative TTL it could immediately delete / destroy the key.

baumgarb pushed a commit to baumgarb/connect-redis that referenced this issue Apr 20, 2021
If the set method is invoked with a session object which has a cookie
that expires in the past then the key is deleted / destroyed. Otherwise,
a negative TTL is calculated and that leads to Redis throwing an error
'ERR invalid expire time in set'.
baumgarb pushed a commit to baumgarb/connect-redis that referenced this issue Apr 20, 2021
If the set method is invoked with a session object which has a cookie
that expires in the past then the key is deleted / destroyed. Otherwise,
a negative TTL is calculated and that leads to Redis throwing an error
'ERR invalid expire time in set'.
@wavded wavded closed this as completed Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants