Ah sorry - you're right. I got "protect_against_forgery? mixed up with "protect_from_forgery" (similar names are confusing).<br>great - curiosity sated ;)<br><br>Cheers,<br>Taryn<br><br><div class="gmail_quote">
2009/7/23 Chris Mear <span dir="ltr"><<a href="mailto:chrismear@gmail.com">chrismear@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On 23 Jul 2009, at 11:54, Taryn East wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
2009/7/23 Murray Steele <<a href="mailto:murray.steele@gmail.com" target="_blank">murray.steele@gmail.com</a>><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
2009/7/23 Taryn East <<a href="mailto:teast@globalpersonals.co.uk" target="_blank">teast@globalpersonals.co.uk</a>><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
class IDontCareAboutNoForgeryController < ApplicationController<div class="im"><br>
self.allow_forgery_protection = false<br>
end<br>
</div></blockquote>
<br><div class="im">
I thought so too... but from looking into the source code "allow forgery protection" is just another way of calling the verify_authenticity_token filter (you can see it here:<a href="http://apidock.com/rails/ActionController/RequestForgeryProtection/ClassMethods/protect_from_forgery" target="_blank">http://apidock.com/rails/ActionController/RequestForgeryProtection/ClassMethods/protect_from_forgery</a>) .<br>
<br>
It doesn't actually stop the token from being rendered into the form for that action (I checked).<br>
</div></blockquote></blockquote>
<br>
I just tried this in a virgin Rails 2.3.3 app, and setting allow_forgery_protection to false did indeed stop the authenticity token being rendered (at least for a form_tag call). It's just a class variable, which is simply checked by ActionController::RequestForgeryProtection::ClassMethods.protect_against_forgery?, which is in turn called by ActionView::Helpers::FormTagHelper.extra_tags_for_form when it's rendering the form tag. So there might be something else sneaky going on your app.<br>
<br>
In the bigger scheme of things, what's wrong with just rendering some random token in the form, and then ignoring it when the form is submitted?<br><font color="#888888">
<br>
Chris</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</div></div></blockquote></div><br>