<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Preventing Cross-Site Request Forgery (CSRF) Attacks</title><link>http://asp.net</link><pubDate>Thu, 23 May 2013 05:00:29 GMT</pubDate><generator>umbraco</generator><description>Comments for Preventing Cross-Site Request Forgery (CSRF) Attacks</description><language>en</language><atom:link href="http://asp.net/rss/comments/43555" rel="self" type="application/rss+xml" /><item><title>Comment Posted by mamby</title><link>http://asp.net/web-api/overview/security/preventing-cross-site-request-forgery-(csrf)-attacks</link><pubDate>Fri, 08 Mar 2013 03:57:53 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000018619</guid><description><![CDATA[ <p>Hi Mike, </p><p>where do we call the &quot;ValidateRequestHeader&quot;?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/mamby.jpg?forceidenticon=false&amp;dt=635049946200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by duanehaworth</title><link>http://asp.net/web-api/overview/security/preventing-cross-site-request-forgery-(csrf)-attacks</link><pubDate>Thu, 09 May 2013 14:50:30 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000019085</guid><description><![CDATA[ <p>And where does the &quot;AntiForgery.GetTokens&quot; method from the line:</p><p></p><p>AntiForgery.GetTokens(null, out cookieToken, out formToken); </p><p></p><p>come from?</p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/duanehaworth.jpg?forceidenticon=false&amp;dt=635049946200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by matt.g</title><link>http://asp.net/web-api/overview/security/preventing-cross-site-request-forgery-(csrf)-attacks</link><pubDate>Wed, 15 May 2013 10:13:32 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000019109</guid><description><![CDATA[ <p>This seems to be all about MVC. What about Web Forms, as this page <a rel="nofollow" href="http://www.asp.net/web-api/overview/security/forms-authentication" target="_blank">www.asp.net/</a> said to go here?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/matt.g.jpg?forceidenticon=false&amp;dt=635049946200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by cornan</title><link>http://asp.net/web-api/overview/security/preventing-cross-site-request-forgery-(csrf)-attacks</link><pubDate>Mon, 20 May 2013 15:30:57 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000019145</guid><description><![CDATA[ <p>I&#39;m not 100% sure I follow how this works.  It would make the post clearer for me if the numbered bullets under &quot;Anti-Forgery Tokens&quot; spelled out the &quot;untrustworthy site&quot; scenario.  Other paragraphs touch on the &quot;same-origin policies&quot;, but they are not included in that set of numbered bullets, so I&#39;m not sure at which point the hidden form field cannot be seen and by &quot;whom&quot;.</p><p></p><p>Otherwise interesting and clear...</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/cornan.jpg?forceidenticon=false&amp;dt=635049946200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by lonelypixel3</title><link>http://asp.net/web-api/overview/security/preventing-cross-site-request-forgery-(csrf)-attacks</link><pubDate>Thu, 23 May 2013 05:00:29 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000019160</guid><description><![CDATA[ <p>When is this anti-forgery token generated and how long is it valid? Consider having the web app open in multiple tabs and doing multiple things concurrently. There can be different form values, but only one cookie. So would it be safe enough to use the same token throughout a session? Then, would it be safe enough to use the session ID value directly as the token? This would avoid a separate cookie and the site itself could easily copy the session ID into a form field, as could AJAX requests.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/lonelypixel3.jpg?forceidenticon=false&amp;dt=635049946200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>