▲ | MajesticHobo2 7 days ago | |||||||||||||||||||||||||||||||||||||||||||||||||
Not sure I agree with this part: > Allow all GET, HEAD, or OPTIONS requests. > These are safe methods, and are assumed not to change state at various layers of the stack already. Plenty of apps violate this assumption and do allow GET requests to alter state. | ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | chrisfosterelli 7 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
IMO apps that do this have a bug, and possibly a security one. This causes issues with prefetching, bot traffic, caching, CSRF, and just plain violates HTTP standards. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | simonw 7 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
Those apps are beyond helping already. They need to fix theselves. | ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | cryptonector 6 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
This is on the server side, on the app. If your supposedly-safe methods aren't safe, then CSRF may not be your biggest problem. | ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | paulhodge 6 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
That’s bad because visiting an evil site can easily trick your browser into performing one of those requests using your own credentials. CORS doesn’t stop the backend state effect from happening. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | motorest 6 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
> Plenty of apps violate this assumption and do allow GET requests to alter state. Yeah, that's not a justification. From a RESTful API design perspective, this just means plenty of apps are buggy/critical design problems. A bug in a random app does not mean HTTP verb lose their semantics. | ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | nchmy 6 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
The entire WordPress ecosystem says hello |