Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft 'Safelinks' (Defender) breaks links. #79

Open
meredevelopment opened this issue Mar 29, 2022 · 3 comments
Open

Microsoft 'Safelinks' (Defender) breaks links. #79

meredevelopment opened this issue Mar 29, 2022 · 3 comments

Comments

@meredevelopment
Copy link

When a client uses a service like Microsoft's 'SafeLinks', one-use login links are broken. It seems that they effectively get used up by a GET to HEAD request that the link checking service does. Here's some more info on another product having the same issue: FusionAuth/fusionauth-issues#629 (and loads of other repos referencing that issue too).

Anyone found a way around this with this package? Presumably it would have the same impact on Laravel's bundled email verification.

@edgrosvenor
Copy link
Contributor

Does it use an identifiable user agent when it checks the links? If so, we could instruct the package to ignore that user agent when deciding whether to expire a single use link.

@nivv
Copy link

nivv commented May 31, 2022

Example of the user agent:

{
   "ip":"20.72.100.79",
   "agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36"
}

@meredevelopment
Copy link
Author

This has come back, with a vengeance 😅 - It seems more recent versions of Outlook or Defender or something, are pre-checking links a lot more now.

For us, the user-agent is always blank it seem (from request logs) and the IP's vary, as you'd expect I suppose, but do seem to be in the same class B subnet:

104.47.1.254
104.47.30.126
104.47.2.254
104.47.59.254
104.47.66.126
104.47.55.254

Further investigations, and thoughts about how to get around this are ongoing, and I'll update here if I find something useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants