Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Changeset [ae19e4141f27f80013c11e8b1da68e5c52c779ea] by Michael Koziarski

Revision ae19e4141f27f80013c11e8b1da68e5c52c779ea, committed by Michael Koziarski · February 8th, 2011 @ 10:57 PM

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/ae19e4141f27f80013c11e8b1da68...

3 changed files

  • M actionpack/lib/action_controller/metal/request_forgery_protection.rb
  • M actionpack/lib/action_dispatch/http/request.rb
  • M actionpack/test/controller/request_forgery_protection_test.rb