Live data from Hacker News

Gmail is opening and caching URLs within emails without user intervention (2019)

support.google.com

81–90 of 271 posts

Re: Gmail is opening and caching URLs within emails without user intervention (2019)

#81

Earlier quoted context omitted.

Btw you could just have JS do a POST request, the user doesn't need to do anything except open the page. This is how unsubscribe pages work.

That presumes everyone executes random JS or has a browser that supports it.

It should go without saying that you provide a fallback.

Re: Gmail is opening and caching URLs within emails without user intervention (2019)

#82
post #3

I built a small Go web app to do some security testing. When a user registers for an account, I generate a 128-bit secure token and email it to the address they provided (as a URL). Token URLs look like this: /validate/email/1d00a5c2648c211befd33f5a8a7cbfab The token is cryptographically strong and disappears after access. It can't be guessed and no one but the email account holder should click it, but I am seeing th…

Yeah lots of email clients do this. Next to caching also lots of scanners for malicious content.

We solved it by having a screen with a confirmation button , then later we added javascript to show a loader page over the button and click the button automatically.

Re: Gmail is opening and caching URLs within emails without user intervention (2019)

#83
post #50
post #13

Earlier quoted context omitted.

True. Phish testing campaigns in companies that send fake phishing emails to employees, are probably full of inaccurate data due to this. "Why did you click that link? But, I didn't."

Many phishing test as a service companies will report clicks vs. people who actually interact with the page.

Would you mind naming some? I kind of have a hard time finding those, and some time ago I purchased phishingly.com for a side project, but it doesn't seem I will be working on this anytime soon, so I may as well pass it on.

Re: Gmail is opening and caching URLs within emails without user intervention (2019)

#84
post #3

I built a small Go web app to do some security testing. When a user registers for an account, I generate a 128-bit secure token and email it to the address they provided (as a URL). Token URLs look like this: /validate/email/1d00a5c2648c211befd33f5a8a7cbfab The token is cryptographically strong and disappears after access. It can't be guessed and no one but the email account holder should click it, but I am seeing th…

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 user intervention (2019)

#85
post #78
post #25

Earlier quoted context omitted.

And make sure the action is a POST instead of a GET. GETs should never modify important state.

This is the correct answer. Just because the norm is to embed verification hashes in URLs to be clicked, doesn't mean it's the right way for it to be done. Why not send a short random code by email for the user to then copy into the sign-up form they were in the process of filling in?

It takes more effort and more users will decide to move elsewhere. I don't really believe that if someone can't bother to copy code from e-mail, he's worthy to have as a client, but some company are obsessed by metrics and percentage of successfully registered users is one of those metrics.

Re: Gmail is opening and caching URLs within emails without user intervention (2019)

#86
post #78
post #25

Earlier quoted context omitted.

And make sure the action is a POST instead of a GET. GETs should never modify important state.

This is the correct answer. Just because the norm is to embed verification hashes in URLs to be clicked, doesn't mean it's the right way for it to be done. Why not send a short random code by email for the user to then copy into the sign-up form they were in the process of filling in?

Clicking a link (one action) is easier than copying a code and pasting it (two actions). It's possible the user will copy the wrong thing or paste the code into a wrong field, including the browser address bar.

All of that may affect the sign-up rate.

Re: Gmail is opening and caching URLs within emails without user intervention (2019)

#87

I always wondered when single-click unsubscribe was going to be a problem because of exactly this. I mean, how do you expect to give a URL to Google and have them just never crawl it?

You make just visiting the URL not everything that needs to be done. So for example, the URL you visit then also runs a small bit of javascript behind the scenes that does the actual unsub action - or the javascript just does a redirect. Or even simpler, you make it so the user has to click a button to POST the request. You've had to do this for years, now. I would assume though, that Gmail is smart enough to go, "oh…

This is what MailChimp does for its one-click unsubscribes.

You visit a URL, and some JS POSTs to `https://[youraccount].us1.list-manage.com/unsubscribe/post` with a body containing your subscription and list IDs.

I'm not sure what prevents crawlers executing JavaScript on that page and triggering the unsubscribe action anyway, though, unless it's just that email crawlers don't execute JS.

Re: Gmail is opening and caching URLs within emails without user intervention (2019)

#88
You can (or used to be able to) embed an HTML form inside an email, and clicking the submit button will perform a POST if that is the method specified. This would probably solve the issue. You avoid an extra click on the resulting page, it's a POST which matches the standard, and Google (presumably) won't hit it.

Re: Gmail is opening and caching URLs within emails without user intervention (2019)

#89
post #78

Earlier quoted context omitted.

This is the correct answer. Just because the norm is to embed verification hashes in URLs to be clicked, doesn't mean it's the right way for it to be done. Why not send a short random code by email for the user to then copy into the sign-up form they were in the process of filling in?

It takes more effort and more users will decide to move elsewhere. I don't really believe that if someone can't bother to copy code from e-mail, he's worthy to have as a client, but some company are obsessed by metrics and percentage of successfully registered users is one of those metrics.

I understand your way of thinking, but we ended up having a flow for a government site where users had 2-3 steps what normally could be done in 1. Also many were not tech savvy and confused. So we ended up adding JS to automate the click.

Re: Gmail is opening and caching URLs within emails without user intervention (2019)

#90

Earlier quoted context omitted.

Btw you could just have JS do a POST request, the user doesn't need to do anything except open the page. This is how unsubscribe pages work.

That presumes everyone executes random JS or has a browser that supports it.

Create a "click here" button, hide it by adding it a class or a style with JS.
Post reply on HN