Live data from Hacker News

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

support.google.com

131–140 of 271 posts

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

#131
post #126

Earlier quoted context omitted.

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.

This endpoint is idempotent - clicking that link multiple times has the same effect as doing it once.

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

#132
post #18
post #12

Earlier quoted context omitted.

> Google will also pre-load all the images in your email too PLEASE disable automatic loading in Gmail settings. Don't let the idiots use unethical, stalkerish e-mail read receipts.

Doesn't gmail's preloading defeat the read receipts? It makes it so every tracking pixel sent to gmail gets loaded (and not by your IP), thereby making it meaningless.

> Doesn't gmail's preloading defeat the read receipts? It makes it so every tracking pixel sent to gmail gets loaded (and not by your IP), thereby making it meaningless.

According to some articles I've read, the marketers can still name the images unique per user.

So when Google's caches query for it, they still know it's you.

I will keep "always load images" off as usual in Gmail.

https://arstechnica.com/information-technology/2013/12/dear-...

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

#133
post #109

Earlier quoted context omitted.

I understand they are known to the public? Every MTA from any random site between the sender and receiver gets the mail, including secrets. They can all decide to scan the site, write them in a log,... Then, when you click the link, if you don't have https, anything between receiver and site also gets a copy of the link. And there are proxys, add injecting ISPs, etc.

Are you claiming that the contents of emails are public? Which "random sites" see emails between sender and receiver? Yes, proxies and ad-injecting ISPs can see the contents of plaintext HTTP. But that's hardly a reason to say that logging into a website with a password or presenting a cookie doesn't count as an authentication system!

I've always treated the contents of emails as public. Things are getting a little better these days, but email is still often forwarded in plaintext through multiple servers owned by disparate parties. There is no reason to believe anything you send in an email will remain private.

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

#134
post #92
post #60

Earlier quoted context omitted.

Ok, that's probably true. Still works as a read receipt though.

Not if gmail always follows (image) links in emails, regardless of whether the recipient address belongs to anyone. Then it’s all noise.

But they don't.

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

#135

Earlier quoted context omitted.

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.

I was just wondering if a web page that counts visitors is idempotent. Not?

It changes state on the server, i.e. the counter. So no.

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

#136
post #22

Earlier quoted context omitted.

Thanks. That's good advice.

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.

Thanks. I don't use JS, just Go with HTML templates. I populate the form now with {{ .code }} from the URL so the user does not have to copy/paste the code. But they do have to click 'Submit' to post the form. I think this is a reasonable approach that most users are OK with.

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

#137
post #113

Earlier quoted context omitted.

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

You can use in email body (obviously does not work in plaintext mode)

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

#138
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…

You can also check for various headers to determine (with quite good accuracy) if a link was clicked by a human or fetched programatically. Here's a list I've accumulated over the years for virtually the same feature as yours:

- `sec-fetch-dest` header is present (HUMAN)

- `accept` header is present (HUMAN)

- `from` header is bingbot(at)microsoft.com (AUTOMATED)

- `user-agent` header includes BingPreview (AUTOMATED)

HTH

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

#139
post #63
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…

I'm sure Google uses a specific user agent to make a request, so you can filter that out. A better solution is to assume that some middleman (email server or client) will always try to access links in the email. Instead send the user a code and have them manually enter it on the linked page.

They did not in my case. Here is the UA string. It looks like a normal client a user might have:

74.51.221.37 - - [19/Aug/2021:22:05:16 +0000] "GET /validate/email/1d00a5c2648c211befd33f5a8a7cbfab HTTP/1.1" 404 0 "" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"

$ dig -x 74.51.221.37 +short

cache.google.com.

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

#140
post #18

Earlier quoted context omitted.

Doesn't gmail's preloading defeat the read receipts? It makes it so every tracking pixel sent to gmail gets loaded (and not by your IP), thereby making it meaningless.

> Doesn't gmail's preloading defeat the read receipts? It makes it so every tracking pixel sent to gmail gets loaded (and not by your IP), thereby making it meaningless. According to some articles I've read, the marketers can still name the images unique per user. So when Google's caches query for it, they still know it's you. I will keep "always load images" off as usual in Gmail. https://arstechnica.com/information…

If Google fetches the images when the mail is delivered (not when it is opened), all the sender learns is that the mail arrived (but not whether the user actually looked at it).

I'm not sure if that's the case though.

Post reply on HN