2

I understand that best practice is to use tokens to prevent CSRF, but why do browsers permit cross-site POST requests in the first place? It seems like giving untrusted parties unfettered write access to your server is a bad idea.

The W3's site says that "Under the same-origin policy, cross-site sending of information is also dangerous since it enables attacks such as cross-site request forgery (CSRF) and clickjacking. The same-origin policy cannot address these security vulnerabilities in the same way it does those around receiving of information since prohibiting cross-site sending of information would prohibit cross-site hyperlinks." [1]

But this seems like a false dichotomy. We could disallow cross-site POSTs while still allowing hyperlinks, which are GETs.

[1] https://www.w3.org/Security/wiki/Same_Origin_Policy

Michael Gummelt
  • 127
  • 1
  • 4

1 Answers1

-1

It seems like giving untrusted parties unfettered write access to your server is a bad idea.

I guess that would be true unless your entire business model depended on it:

CaffeineAddiction
  • 7,517
  • 2
  • 20
  • 40