<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to change CSRF attack message in Symfony 1.2</title>
	<atom:link href="http://bluehorn.co.nz/2010/07/15/how-to-change-csrf-attack-message-in-symfony-1-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://bluehorn.co.nz/2010/07/15/how-to-change-csrf-attack-message-in-symfony-1-2/</link>
	<description>New Zealand Web Design &#38; Development (PHP 5, MySQL, Symfony Framework, Apache, Linux)</description>
	<lastBuildDate>Fri, 09 Dec 2011 18:27:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Sid</title>
		<link>http://bluehorn.co.nz/2010/07/15/how-to-change-csrf-attack-message-in-symfony-1-2/comment-page-1/#comment-6680</link>
		<dc:creator>Sid</dc:creator>
		<pubDate>Thu, 17 Mar 2011 19:52:26 +0000</pubDate>
		<guid isPermaLink="false">http://bluehorn.co.nz/?p=398#comment-6680</guid>
		<description>Hi Matt,

It would be. Someone just need to test it and make sure it is working (and with what version of Symfony).

May be I&#039;ll test your code next time I need something like this.

Cheers</description>
		<content:encoded><![CDATA[<p>Hi Matt,</p>
<p>It would be. Someone just need to test it and make sure it is working (and with what version of Symfony).</p>
<p>May be I&#8217;ll test your code next time I need something like this.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Farmer</title>
		<link>http://bluehorn.co.nz/2010/07/15/how-to-change-csrf-attack-message-in-symfony-1-2/comment-page-1/#comment-6679</link>
		<dc:creator>Matt Farmer</dc:creator>
		<pubDate>Thu, 17 Mar 2011 19:41:39 +0000</pubDate>
		<guid isPermaLink="false">http://bluehorn.co.nz/?p=398#comment-6679</guid>
		<description>Wouldn&#039;t it be better to no loop over all of the erros in changeCSRFErrorMessage and instead do something like (untested): 

public static function changeCSRFErrorMessage(sfForm $form)
{
  $errors = $form-&gt;getErrorSchema()-&gt;getNamedErrors();
  if ( $errors &amp;&amp; isset($errors[&#039;_csrf_token&#039;]) )
  {
    $csrf_error = $errors[&#039;_csrf_token&#039;];
    $validator = $error-&gt;getValidator();
    $validator-&gt;setMessage(&#039;csrf_attack&#039;, &#039;This session has expired. Please return to the home page and try again.&#039;);
  }
}</description>
		<content:encoded><![CDATA[<p>Wouldn&#8217;t it be better to no loop over all of the erros in changeCSRFErrorMessage and instead do something like (untested): </p>
<p>public static function changeCSRFErrorMessage(sfForm $form)<br />
{<br />
  $errors = $form-&gt;getErrorSchema()-&gt;getNamedErrors();<br />
  if ( $errors &amp;&amp; isset($errors['_csrf_token']) )<br />
  {<br />
    $csrf_error = $errors['_csrf_token'];<br />
    $validator = $error-&gt;getValidator();<br />
    $validator-&gt;setMessage(&#8216;csrf_attack&#8217;, &#8216;This session has expired. Please return to the home page and try again.&#8217;);<br />
  }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sid</title>
		<link>http://bluehorn.co.nz/2010/07/15/how-to-change-csrf-attack-message-in-symfony-1-2/comment-page-1/#comment-5496</link>
		<dc:creator>Sid</dc:creator>
		<pubDate>Thu, 20 Jan 2011 20:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://bluehorn.co.nz/?p=398#comment-5496</guid>
		<description>Removing CSRF? You can call $this-&gt;disableCSRFProtection() to remove the CSRF protection of a form. Or to disable all CSRF on all forms, go to the frontend/config/settings.yml and set &quot;csrf_secret: false&quot;</description>
		<content:encoded><![CDATA[<p>Removing CSRF? You can call $this->disableCSRFProtection() to remove the CSRF protection of a form. Or to disable all CSRF on all forms, go to the frontend/config/settings.yml and set &#8220;csrf_secret: false&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerome</title>
		<link>http://bluehorn.co.nz/2010/07/15/how-to-change-csrf-attack-message-in-symfony-1-2/comment-page-1/#comment-5492</link>
		<dc:creator>Jerome</dc:creator>
		<pubDate>Thu, 20 Jan 2011 17:19:33 +0000</pubDate>
		<guid isPermaLink="false">http://bluehorn.co.nz/?p=398#comment-5492</guid>
		<description>This is great.  Symfony prepends the message w/ &quot;_csrf_token:&quot; with is a bit cryptic for end users. Is there a solution for removing it?</description>
		<content:encoded><![CDATA[<p>This is great.  Symfony prepends the message w/ &#8220;_csrf_token:&#8221; with is a bit cryptic for end users. Is there a solution for removing it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

