3 ms·
Loads of people thought it was a good idea. Traditional CSRF attacks work by pointing an HTML form on an evil third party site at an endpoint on the trusted sit
by simonw 13y ago
Loads of people thought it was a good idea. Traditional CSRF attacks work by pointing an HTML form on an evil third party site at an endpoint on the trusted site. HTML forms can't include custom HTTP headers, and you can't make Ajax requests (which can have custom headers) to different domains due to the same-origin policy - so the presence of an X-Requested-With header should be enough to "prove" that the request came from the same domain as you and not from a site run by an attacker.
Unfortunately certain versions of the Flash and JavaScript plugins allow requests to be made to other domains with custom headers, which left CSRF holes open.
- michaelmior 13y agoWhat do you mean by "JavaScript plugin"?
- richbradshaw 13y agoThink it's a typo for Java.
- michaelmior 13y agoAh, that makes sense! Been such a long time since I've run a Java applet that I don't think about them anymore.
- e28eta 13y agoMy guess was browser plugins (implemented in Javascript).