aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-05-17 01:29:27 +0530
committerVipul A M <vipulnsward@gmail.com>2016-05-17 01:29:27 +0530
commita3aa53684eb8c39db4aa03bc69b8ee15deadeb80 (patch)
treeff615fd91708f3d51334e65900ed47e3fc1b2699 /guides/source
parentbd49a4b175e056c77610c78ac109eab0c3411af8 (diff)
parentf27325d7e5cce3088c746ca91393b5fd95ee8552 (diff)
downloadrails-a3aa53684eb8c39db4aa03bc69b8ee15deadeb80.tar.gz
rails-a3aa53684eb8c39db4aa03bc69b8ee15deadeb80.tar.bz2
rails-a3aa53684eb8c39db4aa03bc69b8ee15deadeb80.zip
Update the Rails security guide [ci skip]
Update the Rails security guide [ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/security.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/security.md b/guides/source/security.md
index 16c5291037..1bc678b962 100644
--- a/guides/source/security.md
+++ b/guides/source/security.md
@@ -50,9 +50,9 @@ User.find(session[:user_id])
### Session id
-NOTE: _The session id is a 32 byte long MD5 hash value._
+NOTE: _The session id is a 32-character random hex string._
-A session id consists of the hash value of a random string. The random string is the current time, a random number between 0 and 1, the process id number of the Ruby interpreter (also basically a random number) and a constant string. Currently it is not feasible to brute-force Rails' session ids. To date MD5 is uncompromised, but there have been collisions, so it is theoretically possible to create another input text with the same hash value. But this has had no security impact to date.
+The session id is generated using `SecureRandom.hex` which generates a random hex string using platform specific methods (such as openssl, /dev/urandom or win32) for generating cryptographically secure random numbers. Currently it is not feasible to brute-force Rails' session ids.
### Session Hijacking