This project is archived and is in readonly mode.
Changeset [b5d759fd2848146f7ee7a4c1b1a4be39e2f1a2bc] by Michael Koziarski
Revision b5d759fd2848146f7ee7a4c1b1a4be39e2f1a2bc,
committed by Michael Koziarski
· January 17th, 2011 @ 01:14 AM
Change the CSRF whitelisting to only apply to get requests
Unfortunately the previous method of browser detection and XHR whitelisting is unable to prevent requests issued from some Flash animations and Java applets. To ease the work required to include the CSRF token in ajax requests rails now supports providing the token in a custom http header:
X-CSRF-Token: ...
This fixes CVE-2011-0447
https://github.com/rails/rails/commit/b5d759fd2848146f7ee7a4c1b1a4b...
3 changed files
-
A
actionpack/lib/action_view/helpers/csrf_helper.rb -
M
actionpack/lib/action_controller/request_forgery_protection.rb -
M
actionpack/test/controller/request_forgery_protection_test.rb