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

ttl和keepAlive功能存在bug #251

Open
0ui0 opened this issue Oct 15, 2024 · 0 comments
Open

ttl和keepAlive功能存在bug #251

0ui0 opened this issue Oct 15, 2024 · 0 comments
Labels
bug Bug or defect

Comments

@0ui0
Copy link

0ui0 commented Oct 15, 2024

Runtime

nodejs chrome

Runtime version

node 20.18.0

Module version

12.0.1

Last module version without issue

No response

Used with

No response

Any other relevant information

No response

What are you trying to achieve or the steps to reproduce?

如果没有启用ttl之前用户登录写入了一条cookie,启用ttl和keepalive之后,会再写入一条cooke且不会清除上一条cookie,此时会存在两条cookie,且会读取到旧的cookie导致用户无法登录,keepAlive写入之前可能要unstate一下
keepalive还存在一个问题,如果用户a登出,再登录用户b,结果登录的还是用户a。因为异步响应有延迟,可能导致a登出后清除的cookie被服务器延迟响应的keepAlive重新写入,于是a又被登录了

What was the result you got?

见上

What result did you expect?

见上

@0ui0 0ui0 added the bug Bug or defect label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or defect
Projects
None yet
Development

No branches or pull requests

1 participant