Comments
-
Greg Hurrell
According to Ack, these are the only places where I have a GET form:
app/views/articles/index.html.haml 27:=form_tag search_tags_path, :method => 'get' do app/views/tags/search.html.haml 10: =form_tag search_tags_path, :method => 'get' do
I can't remember right now why I chose to use a GET form; probably something to do with page caching and forgery protection tokens. Can always just turn off the tokens for the
tags#search
action usingskip_before_filter :verify_authenticity_token, :only => :search
, and suppress the insertion of the token in the form itself.Just need to review the security consequences of doing so first.
-
Greg Hurrell
Unfortunately there is no way to "suppress" the insertion of the token. I suppose I could turn off forgery protection entirely just while rendering the form, but that seems horribly kludgey.
The only way around this, then, is to hand-code the form, and if I do that I lose the auto-inserted snowman, so will have to recreate that by hand. Such is life, I guess.
As far as security is concerned, there is no need for CSRF protection here because we're talking about a non-destructive action (ie. not a create, delete or update).
-
Greg Hurrell
Ok, done. Hand-coded forms. Will be included in next deployment.
-
Greg Hurrell
Status changed:
- From: new
- To: closed
Add a comment
Comments are now closed for this issue.