Skip to content

RedisTokenStore mutates caller-owned options during initialization #597

Description

@OskarEichler

Summary

RedisTokenStore#initialize deletes :redis and :prefix directly from the caller's options hash. Reusing or freezing a configuration hash therefore changes later behavior or raises FrozenError.

Proposed correction

Duplicate the options hash before consuming constructor-only keys. Candidate: 0c78985a6dc8de3f53ca9b80e2b4065d02311ce2 on 1.17.4/current main (01431c9ecd59e1efc5d262694971ded925044fdc).

The focused model covers preserved caller state, frozen hashes and explicit Redis objects without a live server. The cumulative suite passes 659 RSpec examples (20 expected pending), 103 Minitest runs /201 assertions and four integration runs /41 assertions, plus RuboCop, syntax, YARD and package/install checks.

I used an AI coding assistant during source review and verification. I am opening an issue first because repository policy requires tests, a changelog and a Google CLA for pull requests; this audit cannot alter repository tests and no CLA was signed as part of it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions