Ruby on Rails Security Project

Exploring the Security of Rails and friends.

Ruby on Rails Security Project header image 2

InvalidAuthenticityToken for in_place_editing?

January 18th, 2008 · 1 Comment

There is a problem with InvalidAuthenticityToken errors that are raised in the methods for the in_place_editing plugin. This happens in Rails 2.0.2 (and possibly earlier versions). It's because there is no authenticity_token sent at all. You can apply this patch until there is a new version out.

If you have something like this:

<%= in_place_editor("title", {:url => url_for(:action => "update_title" …)}) %>

the update_title method will throw an error. Apply the patch to make it work.

Tags: Uncategorized

1 response so far ↓

  • 1 Reda // Feb 1, 2008 at 12:17

    Thanks for the tip

Leave a Comment