Hacker News new | past | comments | ask | show | jobs | submit login

If browsers could fix CSRF for JSON they could probably fix it in general. My impression is that browsers have done what they can. Sites without CSRF protection should do a better job.



The Origin HTTP header[0] is the fix for CSRF.

It's been plagued initially be slow adoption and later by inconsistent support like the example in this article and others[1], but as a general spec. it should fix CSRF if implemented consistently and correctly by browser vendors.

[0] https://tools.ietf.org/html/rfc6454#section-7

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1508661


SameSite cookies handle pretty much all cases and are supported in all modern browsers. If your login (which is what usually issues the cookie) does a module/nomodule check SameSite is probably enough.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: