spree/spree — pull request #5601 by mbj (2014-11-12 01:36:56+00:00)
Title: Validate authenticity token on all actions but populate

Since https://github.com/MountainRoseHerbs/spree/commit/95ea57058ab1c5e722b327b10747cd41e68a4deb the authenticity token validation was disabled for all cart actions. This is not a good idea. Actions like `#empty` and `#update`, ... should NOT be easily CSRF-able.

I agree that allowing populations without CSRF token makes *some* sense. I see options to work around this issue, like edge side includes etc. But lets at least do a *mimimal* negative security impact solution by default.

This commit is an incremental improvement in that sense.

This commit has no specs. As I typically do NOT specify behavior of the framework (unless its dynamically invoked).

I request a backport to at least `2-3-stable`.