News for hackers. Stuff that matters.
Re:Gmail is opening and caching URLs within emails without u... by Doxin on Friday August 20, 2021 @02:34AM (#28243277)
Or link them to a page with a POST form that actually performs the action. That way you only add a single click to the flow, and no remotely sane software will automatically perform POST requests to arbitrary urls.
Re:Gmail is opening and caching URLs within emails without u... by kuu on Friday August 20, 2021 @05:39AM (#28244320)
> no remotely sane software will automatically perform POST requests to arbitrary urls

I'm not a web developer. Out of curiosity, why is that?

Re:Gmail is opening and caching URLs within emails without u... by Doxin on Friday August 20, 2021 @07:57AM (#28245051)
Websites are generally designed such that GET requests are side-effect free, and POST requests do have side effects. So for example searching on google is a GET request. It doesn't do anything other than serve the requested page. Logging in on the other hand has the side effect of setting cookies and probably writing some stuff to the database, so that's a POST request.

These assumptions are so baked into web software that while assuming a GET request won't do anything zany or overly stateful is probably fine, assuming the same for a POST request should probably be considered negligent.

Re:Gmail is opening and caching URLs within emails without u... by motogpjimbo on Friday August 20, 2021 @05:57AM (#28244409)
For precisely the reason being discussed here: GET requests can be performed automatically for many reasons. For example, if you've ever pasted a URL into a Slack channel (or similar) and seen the link converted into a thumbnail of the page a few moments later, you've seen a piece of software issue a GET request on your behalf. Now imagine that wasn't a link to a page but a link to an something that modified your account - resetting your password, for example.
Re:Gmail is opening and caching URLs within emails without u... by karolist on Friday August 20, 2021 @05:58AM (#28244411)
POST requests typically perform modifications on the server based on user action, like POST'ing this comment. GET requests should be idempotent.