Skip to content

After changeSessionId, expirationStore(ordered set) lost the new sessionId #3363

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

Open
hdsuperman opened this issue Mar 26, 2025 · 0 comments
Labels
status: waiting-for-triage An issue we've not yet triaged type: bug A general bug

Comments

@hdsuperman
Copy link

Describe the bug

After changeSessionId, expirationStore(ordered set) lost the new sessionId

To Reproduce

  1. config SortedSetRedisSessionExpirationStore for expirationStore
  2. Create a new session and save it
  3. FindById to get the previously saved session
  4. Call changeSessionId and save it
  5. You can see in the expiration kv of redis that the new sessionId does not exist

Expected behavior

The old sessionId should be deleted and the new sessionId should be appended to the sorted set of redis

Source

RedisIndexedSessionRepository.this.expirationStore.remove(this.originalSessionId);

How to fix

We can add a rename method to the RedisSessionExpirationStore interface

rename(String oldSessionId, String newSessionId, Integer expirationInMillis)
@hdsuperman hdsuperman added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant