There's no documentation for this item.
| Modules |
| ClassMethods |
Protecting controller actions from CSRF attacks by ensuring that all forms
are coming from the current web application, not a forged link from another
site, is done by embedding a token based on the session (which an attacker
wouldn’t know) in all forms and Ajax requests generated by Rails and
then verifying the authenticity of that token in the controller. Only
HTML/JavaScript requests are checked, so this will not protect your XML API
(presumably you’ll have a different authentication scheme there
anyway). Also, GET requests are not protected as these should be
indempotent anyway.
|
<code/>and<pre/>for code samples.