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 for ID generation vulnerability #856 #857

Merged
merged 4 commits into from
Apr 26, 2012

Conversation

martinthomson
Copy link
Contributor

Using crypto.randomBytes to generate a session ID. 96 bits of randomness, 24 bits of sequence number. Using the URL safe base64 encoding RFC 4648 to represent the value.

Backward compatibility for node 0.4 uses an insecure generation method with Math.random(). I could fix this too, but I don't believe that this version of node is still popular enough to justify the effort.

rauchg added a commit that referenced this pull request Apr 26, 2012
Fix for ID generation vulnerability #856
@rauchg rauchg merged commit de1afe1 into socketio:master Apr 26, 2012
@rauchg
Copy link
Contributor

rauchg commented Apr 26, 2012

Thanks a lot @martinthomson. This has been long overdue

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.

None yet

2 participants