0
@@ -14,27 +14,27 @@ require 'openssl' # to generate the HMAC message digest
0
# TamperedWithCookie is raised if the data integrity check fails.
0
# A message digest is included with the cookie to ensure data integrity:
0
-# a user cannot alter his
user_id without knowing the secret key included in
0
+# a user cannot alter his
+user_id+ without knowing the secret key included in
0
# the hash. New apps are generated with a pregenerated secret in
0
# config/environment.rb. Set your own for old apps you're upgrading.
0
-# :secret An application-wide key string or block returning a string
0
-# called per generated digest. The block is called with the
0
-# CGI::Session instance as an argument. It's important that the
0
-# secret is not vulnerable to a dictionary attack. Therefore,
0
-# you should choose a secret consisting of random numbers and
0
-# letters and more than 30 characters.
0
-# Example: :secret => '449fe2e7daee471bffae2fd8dc02313d'
0
-# :secret => Proc.new { User.current_user.secret_key }
0
+# * <tt>:secret</tt>: An application-wide key string or block returning a string
0
+# called per generated digest. The block is called with the CGI::Session
0
+# instance as an argument. It's important that the secret is not vulnerable to
0
+# a dictionary attack. Therefore, you should choose a secret consisting of
0
+# random numbers and letters and more than 30 characters. Examples:
0
-# :digest The message digest algorithm used to verify session integrity
0
-# defaults to 'SHA1' but may be any digest provided by OpenSSL,
0
-# such as 'MD5', 'RIPEMD160', 'SHA256', etc.
0
+# :secret => '449fe2e7daee471bffae2fd8dc02313d'
0
+# :secret => Proc.new { User.current_user.secret_key }
0
+# * <tt>:digest</tt>: The message digest algorithm used to verify session
0
+# integrity defaults to 'SHA1' but may be any digest provided by OpenSSL,
0
+# such as 'MD5', 'RIPEMD160', 'SHA256', etc.
0
# To generate a secret key for an existing application, run
0
-# `rake secret` and set the key in config/environment.rb
0
+# `rake secret` and set the key in config/environment.rb
.0
# Note that changing digest or secret invalidates all existing sessions!
0
class CGI::Session::CookieStore
Comments
No one has commented yet.