Earlier quoted context omitted.
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.
We've done this for over 2 years now, and over 200k users never ran into this. Also not within government users.
Gmail is opening and caching URLs within emails without user intervention (2019)
171–180 of 271 posts
Re: Gmail is opening and caching URLs within emails without user intervention (2019)
#172Re: Gmail is opening and caching URLs within emails without user intervention (2019)
#173Earlier quoted context omitted.
Another idea is to have 3 links, where only one is visible: https://example/com/token?forBots https://example.com/token https://example.com/token?forBots Hopefully any automated systems will open the first or last link first, so that you can save the request info and filter based on that. In case requests come out of order, you can always add a small delay to the "human" link before responding. I haven't yet gotten t…
No link in an email should perform an action on its own. Every link should lead to a confirmation button, at minimum. Too many services automatically open all the links in emails.
But in those cases there may be an automatic POST after you travel to the link, so it wouldn't be triggered by gmail looking up the url.
Re: Gmail is opening and caching URLs within emails without user intervention (2019)
#174Re: Gmail is opening and caching URLs within emails without user intervention (2019)
#175Earlier quoted context omitted.
You could add a single line of JS to have it auto submitted as well
Wouldn't that be equivalent to just doing a GET?
Re: Gmail is opening and caching URLs within emails without user intervention (2019)
#176I 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…
Re: Gmail is opening and caching URLs within emails without user intervention (2019)
#177I 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…
Isn't there a way to verify that the click is coming from GMail? Maybe via User Agent or its IP.
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"
I suppose you could somehow block cache.google.com but I suspect Microsoft and others do similar things.
Re: Gmail is opening and caching URLs within emails without user intervention (2019)
#178Re: Gmail is opening and caching URLs within emails without user intervention (2019)
#179Earlier 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?
> user to then copy into the sign-up form Extra steps are hard and boring and people don’t want to do them. I consider myself a savvy user and I want to click a link. Not click a link, then look up a code from the email, then paste, then click submit. I’d live with having to manually click “I’m sure I want to unsubscribe” or something. This is most annoying when the site wants me to type in my email address to unsubs…
One of them mentioned that you can continue keeping things as a 1 click solution with the token in the URL, but instead of doing the destructive action upon visiting the link -- instead you would get sent to a page with a form where the token is put into a hidden field that gets auto-submit as a POST request with Javascript.
This way from your POV it's a 1 click solution. You only waste a second waiting for the redirect and if the user doesn't have Javascript enabled you can the field as being an input field which is pre-filled out based on the value from the URL (this can be done server side).
Now everyone is happy, unless gmail is going to go as far as auto-following redirects with JS enabled.
Re: Gmail is opening and caching URLs within emails without user intervention (2019)
#180Earlier quoted context omitted.
> user to then copy into the sign-up form Extra steps are hard and boring and people don’t want to do them. I consider myself a savvy user and I want to click a link. Not click a link, then look up a code from the email, then paste, then click submit. I’d live with having to manually click “I’m sure I want to unsubscribe” or something. This is most annoying when the site wants me to type in my email address to unsubs…
There were good suggestions in other comments in this HN post. One of them mentioned that you can continue keeping things as a 1 click solution with the token in the URL, but instead of doing the destructive action upon visiting the link -- instead you would get sent to a page with a form where the token is put into a hidden field that gets auto-submit as a POST request with Javascript. This way from your POV it's a…