Live data from Hacker News

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

support.google.com

71–80 of 271 posts

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

#71
post #14

HTTP GET requests should not be interpreted by the server as a request to change something. That's what POST, PUT, DELETE and PATCH are for.

I agree, but how do you initiate a POST request via an email message? Embedding a form sometimes raises its own security alert.

You can do it with js but that assumes that google is not running any js which is probably not a safe assumption.

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

#72

This is a good feature in my opinion. Why should I let the sender know when I click on tracking links or view the email? If you really want to, just filter out clicks from AS15169.

So this way Google automatically confirms the validity of the email to spammers by visiting all their links? Doesn't sound great, and people still know when you click on links or view the email. They just have to guess a bit better.

They already do this. If you send to an invalid address gmail will respond saying the email can not be delivered.

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

#73
post #21
post #6

All URLs sent to any major email provider are "clicked" because they are scanning the page to see if it is phishing or otherwise malicious (desktop antivirus and other things will also prescan URLs). It also protects privacy by defeating click tracking on marketing emails. Google will also pre-load all the images in your email too. You shouldn't take any write action to your database just based on a URL being visited…

You think every email provider crawls links in your email and the inspects the destinations to protect you from spam? That is patently not true, otherwise you would be dealing with utter chaos as you interacted with the internet. If, as the OP claims, Gmail actually _is_ doing this, then that is worrying but it's not the general case. Google pre-loads and caches images, which many people consider problematic, but the…

Office 365 calls this "safe links" and it's a feature in Outlook and teams. They have a page describing it and everything.

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

#74
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.

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

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

Make the user take action after opening the link. Like click a button.

[deleted]

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

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

Does gmail respect robots.txt?

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

#78
post #25

Earlier quoted context omitted.

Make the user take action after opening the link. Like click a button.

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?

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

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

Yes and outlook 365 too. We had to add an extra step to our activation process to handle this (a prompt to click a link to proceed). I would not be surprised if they start making their link-follower start clicking around inside opened pages too :-/

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

#80
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.

That presumes everyone executes random JS or has a browser that supports it.
Post reply on HN