by weitzj · 9y ago · 0 comments
- server sends an HTTP only cookie, which cannot be read from JavaScript - server sends a new CSRF token via Header/Form for each request
On POST send back the CSRF token via FORM/Header and let browser send along the HTTP only cookie
The owasp cheat sheets are a good read
But what I am wondering is if using "Access-Control-Allow-Origin: evil-site.example.com or *" can be used to exploit the cookie-to-header technique with a token for every request (GETS included), no form GETS (so token doesn't appear in url query), https, and no browser bugs or XSS vulnerabilities. The wiki articles suggest it could be exploited, but I'm thinking they're just worded conservatively.