aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-02-20 01:18:03 +0530
committerMani Tadayon <bowsersenior@gmail.com>2011-02-21 13:44:19 -0800
commit9345e9cca241c201443ae1feec08de967851b231 (patch)
tree528bffb25b40a69d9bcfe59eccd2c25e9570fe85 /railties/guides
parent308328fd7fff4ec3436484095488a9105060d950 (diff)
downloadrails-9345e9cca241c201443ae1feec08de967851b231.tar.gz
rails-9345e9cca241c201443ae1feec08de967851b231.tar.bz2
rails-9345e9cca241c201443ae1feec08de967851b231.zip
session is reset on token mismatch
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/security.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/security.textile b/railties/guides/source/security.textile
index 7f303c3565..5613156245 100644
--- a/railties/guides/source/security.textile
+++ b/railties/guides/source/security.textile
@@ -240,7 +240,7 @@ There are many other possibilities, including Ajax to attack the victim in the b
protect_from_forgery :secret => "123456789012345678901234567890..."
</ruby>
-This will automatically include a security token, calculated from the current session and the server-side secret, in all forms and Ajax requests generated by Rails. You won't need the secret, if you use CookieStorage as session storage. It will raise an ActionController::InvalidAuthenticityToken error, if the security token doesn't match what was expected.
+This will automatically include a security token, calculated from the current session and the server-side secret, in all forms and Ajax requests generated by Rails. You won't need the secret, if you use CookieStorage as session storage. If the security token doesn't match what was expected, the session will be reset. *Note:* In Rails versions prior to 3.0.4, this raised an <tt>ActionController::InvalidAuthenticityToken</tt> error.
Note that _(highlight)cross-site scripting (XSS) vulnerabilities bypass all CSRF protections_. XSS gives the attacker access to all elements on a page, so he can read the CSRF security token from a form or directly submit the form. Read <a href="#cross-site-scripting-xss">more about XSS</a> later.