News for hackers. Stuff that matters.
Re:GitHub's post-CSP journey by steffenweber on Friday January 20, 2017 @05:57AM (#13442867)
CSRF protection is not about attacks from evil clients (you can easily spoof any header with the HTTP client library of your choice, of course). CSRF protection is about preventing innocent / well-behaving clients from being tricked into POSTing some data on behalf of their (logged-in) user.
Re:GitHub's post-CSP journey by ricardobeat on Friday January 20, 2017 @07:11AM (#13443222)
Yes. Forwarding a unique CSRF token from the backend gives you some assurance that it's a legitimate request, initiated from a pageview within a timeframe. A header (origin) which always has the same value (the hostname) is inherently less secure, though I overstated how much in the previous comment.
Re:GitHub's post-CSP journey by rhpistole on Friday January 20, 2017 @11:25AM (#13444860)
You can use it to identify unsophisticated attacks, sure.

However, if someone has the ability to make malicious HTTP requests on my behalf using my browser can you really be sure that they don't have the ability to make malicious HTTP requests with altered headers through a malicious extension or a browser specific exploit or some other vector?

You still have to do all the other attack mitigation strategies in addition to checking the Origin header, and I'm not sure the extra complexity buys you anything in the long-term.