News for hackers. Stuff that matters.
Re:Gmail is opening and caching URLs within emails without u... by vs4vijay on Friday August 20, 2021 @03:21AM (#28243532)
That's why it should not be HTTP GET endpoint. Get endpoint should only be when request is idempotent. Use HTTP POST for your usecase.
Re:Gmail is opening and caching URLs within emails without u... by mnahkies on Friday August 20, 2021 @03:51AM (#28243697)
Is it possible to embed a link that uses POST in an email? I can't think of a way unless form tags work, but then the link wouldn't work in a plain text email reader
Re:Gmail is opening and caching URLs within emails without u... by harg on Friday August 20, 2021 @04:02AM (#28243770)
You’d need to send the user to the verify page and populate a form with their token from the url. Then submit the form, either automatically or by getting the user to manually hit a button.
Re:Gmail is opening and caching URLs within emails without u... by miken123 on Friday August 20, 2021 @06:18AM (#28244500)
You should not submit the form automatically. Tools like Microsoft O365 ATP run any links in an emulated browser with Javascript support. These will, in some cases, happily autosubmit the form for you.
Re:Gmail is opening and caching URLs within emails without u... by toshk on Friday August 20, 2021 @08:46AM (#28245359)
We've done this for over 2 years now, and over 200k users never ran into this. Also not within government users.
Re:Gmail is opening and caching URLs within emails without u... by miken123 on Friday August 20, 2021 @10:35AM (#28246502)
It could very well be that your specific Javascript does not run automatically or does not run correctly. I see the same with one of our auto-submitting forms. I do not know whether or not that is intentional on Microsoft's part. But other users have had different experiencies, so be aware that Microsoft may 'fix' their issue on some day and all of a sudden all your users will start clicking/unsubscribing/whatevering automatically.

See https://blog.healthchecks.io/2019/12/preventing-office-365-a... for someone who did have this experience.

Re:Gmail is opening and caching URLs within emails without u... by bombcar on Friday August 20, 2021 @09:28AM (#28245673)
Turn on O365 “link scanning for malware” and Salesforce onetime links for password resets etc stop working.
Re:Gmail is opening and caching URLs within emails without u... by addingnumbers on Friday August 20, 2021 @11:25AM (#28247124)
How do you know your users have never run into this?

People don't tend to report problems like "my account was activated sooner than I expected"

Re:Gmail is opening and caching URLs within emails without u... by toshk on Saturday August 21, 2021 @04:30AM (#28255247)
We use it to log in users. We quickly get complaints if something doesn't work well.
Re:Gmail is opening and caching URLs within emails without u... by addingnumbers on Monday August 23, 2021 @03:07PM (#28280523)
But your users ought to believe it works well to have google's servers respond to the activation link instead of requiring them to click it themselves, so no complaints.

The verification process serves only you, the administrator. To everyone else it's a tedious obstacle.

Nobody will reach out to you to say "I made it through the registration process just fine but it was slightly less burdensome than I expected, is everything OK?"

If you want to know if Google is hitting your activation URLs, check your access logs. Your users will almost certainly not realize it happened. Even if they do notice it, there is no impact on them and no motivation to inform you. You would have to be extremely lucky to hear about it from a user.

Re:Gmail is opening and caching URLs within emails without u... by clusterfish on Friday August 20, 2021 @10:30AM (#28246445)
Half of unsubscribe links seem to auto-submit. Are they all broken in O365?
Re:Gmail is opening and caching URLs within emails without u... by timwis on Friday August 20, 2021 @04:10AM (#28243800)
This is how mail chimp does it, I believe. JavaScript to submit the form automatically.
Re:Gmail is opening and caching URLs within emails without u... by bawolff on Friday August 20, 2021 @06:05AM (#28244448)
Depending on how your app works, non-idempotent links in emails can often be an over-looked csrf vector. Sometimes people also make such links auto log people in which can be problematic.
Re:Gmail is opening and caching URLs within emails without u... by janci on Friday August 20, 2021 @05:41AM (#28244325)
You can use <form method=POST> in email body (obviously does not work in plaintext mode)
Re:Gmail is opening and caching URLs within emails without u... by chrisshroba on Friday August 20, 2021 @07:15AM (#28244789)
I this sometime triggers a warning to the user (something like “Are you sure you want to submit form data to external site?”), which may not be the best end user experience.
Re:Gmail is opening and caching URLs within emails without u... by wizzwizz4 on Friday August 20, 2021 @09:04AM (#28245489)
If you put a header “account verification form” above the button, it's a better experience; the user knows what the computer is calling a form.
Re:Gmail is opening and caching URLs within emails without u... by inetknght on Friday August 20, 2021 @12:17PM (#28247761)
That sounds very phishy.
Re:Gmail is opening and caching URLs within emails without u... by inetknght on Friday August 20, 2021 @12:16PM (#28247758)
You're assuming the email is HTML. No, not all users use HTML email.
Re:Gmail is opening and caching URLs within emails without u... by detaro on Friday August 20, 2021 @12:19PM (#28247778)
What do you think the second sentence of their comment is talking about?
Re:Gmail is opening and caching URLs within emails without u... by Tade0 on Friday August 20, 2021 @06:34AM (#28244593)
This endpoint is idempotent - clicking that link multiple times has the same effect as doing it once.
Re:Gmail is opening and caching URLs within emails without u... by shadowgovt on Friday August 20, 2021 @10:30AM (#28246442)
Correct. Idempotency isn't precisely the right concept to appeal to here. The right concept is that GET requests are assumed by convention to be "safe," which implies they aren't tied to user interaction. "...user did not request the side-effects, so therefore cannot be held accountable for them" (https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#:~:te....).
Re:Gmail is opening and caching URLs within emails without u... by account42 on Friday August 20, 2021 @06:51AM (#28244672)
Presumably there is a different content for the first response when the token is still valid, otherwise this would be a pointless link.
Re:Gmail is opening and caching URLs within emails without u... by tantalor on Friday August 20, 2021 @08:18AM (#28245194)
Not if it "disappears after access"
Re:Gmail is opening and caching URLs within emails without u... by xunn0026 on Friday August 20, 2021 @06:39AM (#28244607)
I was just wondering if a web page that counts visitors is idempotent. Not?
Re:Gmail is opening and caching URLs within emails without u... by Filligree on Friday August 20, 2021 @07:13AM (#28244779)
It changes state on the server, i.e. the counter. So no.
Re:Gmail is opening and caching URLs within emails without u... by mananaysiempre on Friday August 20, 2021 @07:47PM (#28252676)
I’d say it depends on what the counter is for. If it’s used to bill the user per pageview, then it’s user-visibly not an idempotent action, so no. If it’s used to estimate site speed, then the user doesn’t care, so yes. (In fact, analytics is the example I see most often under “non-idempotent stuff it’s OK to do on a GET”.) If it’s used to display a counter in the site footer, then you might wish the user cared for your bragging, but they probably don’t, so yes with a disapproving glance in your general direction.
Re:Gmail is opening and caching URLs within emails without u... by motoboi on Friday August 20, 2021 @06:42AM (#28244624)
Well, this is why your email provider should not open your links for you. Use a different email provider instead.
Re:Gmail is opening and caching URLs within emails without u... by shadowgovt on Friday August 20, 2021 @08:07AM (#28245125)
I think I'm going to continue using the one that is pre-opening links that should be idempotent so that it can check them against its heuristics for spam or phishing. That's been really nice to have.

And I'll instead refrain from using sites that inappropriately provide bare get URLs that are really state-mutating booby traps in disguise.

Re:Gmail is opening and caching URLs within emails without u... by mat0 on Friday August 20, 2021 @08:49AM (#28245376)
Lol, the nerve of the other reply: "stop using the most widely used email provider in the world". I liked your reply better