Maciej Stachowiak wrote on 1/14/2009 6:14 PM: 
> Why does the CSRF defense header need to change on redirect?

Because to the site on the far end, it would appear the request came from 
somewhere it didn't, effectively hiding the real source of the request.  This 
probably explains it better:

-----
When an honest site initiates a request to a dishonest site (for example 
because the user followed a hyperlink), the dishonest site can redirect the 
request back to the honest site. If the redirected request carries the same 
Origin header as the original request, the request will implicate the honest 
site as generating the request. To protect the honest site, the user agent 
replaces the Origin header with null, so a conforming server will not modify 
state in response to a redirect.

http://crypto.stanford.edu/websec/specs/origin-header/
-----


- Bil


Reply via email to