Actions
Bug #2109
closedsession_token should not be static
Status:
Closed
Priority:
Immediate
Assignee:
Category:
Users, Roles and Permissions
Target version:
Description
The session token of rails app should not be public available and static for all installations.
http://biggestfool.tumblr.com/post/24049554541/reminder-secret-token-rb-is-named-so-for-a-reason
Solution:
Generate the session token using SecureRandom, maybe as Rake Task, and add it to the installation and upgrade guides.
if RUBY_VERSION >= 1.9
require 'securerandom'
SecureRandom.urlsafe_base64(64)[0..63]
#=> "sZT3OdJVpHeIdbH5O8YLflOBXJbOv2ZY76GqsN1Clg1c1aiOzcMFZzKrRfUtJDTS"
else
...
end
Files
Actions