Skip to content

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

Open
@hdsuperman

Description

@hdsuperman

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions