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

Fix secure session using private_id #146

Merged
merged 4 commits into from
May 16, 2023

Conversation

biinari
Copy link
Contributor

@biinari biinari commented May 15, 2023

Fixes #145.

Addresses CVE-2019-16782

Use the private_id from Rack::Session::SessionId added in rack/rack@cc1d162 as the key to store in redis. This should prevent a timing attack based on session lookup.

Fallback on the old redis key as the public_id so that old sessions continue to work.

Prepend a version number to match the format of the real private_id hash but
keep the plain value visible for ease of debugging tests.
The private_id is to be used as the redis key, public id is to be set in the
cookie.
@Jesterovskiy Jesterovskiy merged commit 21c576d into roidrage:master May 16, 2023
@Jesterovskiy
Copy link
Collaborator

Great job! Thanks

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

Successfully merging this pull request may close these issues.

Incomplete fix to secure session store CVE-2019-16782
2 participants