Project

General

Profile

Actions

Bug #2109

closed

session_token should not be static

Added by Sandor Szücs over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Users, Roles and Permissions
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

security.rake security.rake 1.22 KB put it into lib/tasks/ Sandor Szücs, 01/05/2013 08:05 AM
Actions

Also available in: Atom PDF