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

Handle Teams links #24

Closed
stuartleeks opened this issue Jan 13, 2021 · 2 comments · Fixed by #25
Closed

Handle Teams links #24

stuartleeks opened this issue Jan 13, 2021 · 2 comments · Fixed by #25

Comments

@stuartleeks
Copy link
Contributor

Links from Microsoft Teams have 'safe link' handling, e.g. https://staticsint.teams.cdn.office.net/evergreen-assets/safelinks/1/atp-safelinks.html?url=https%3A%2F%2Fregistry.terraform.io%2Fproviders%2Fhashicorp%2Fazurerm%2Flatest%2Fdocs%2Fresources%2Fprivate_dns_zone_virtual_network_link&locale=en-gb...... which breaks default rules.

It would be great to decode the Teams link to display and use the underlying link for default rules.

@mortenn
Copy link
Owner

mortenn commented Jan 14, 2021

After reading your suggestion and PR, I thought it would be nifty to add in similar support for the most common URL shorteners.
Maybe even do a quick background fetch of any URL and look for any Location headers?
I haven't checkout how the teams API handles the redirect, but if they simply send you a Location, it would cover that case as well - but they possibly show you a jump page with a link to continue, I suppose?

@stuartleeks
Copy link
Contributor Author

That sounds like a great idea! The teams links contain the target URL embedded in the URL launch but extending the approach to include the background fetch seems like it would fit nicely with the changes in the PR (and if I get BrowserPicker working for my scenario it is potentially something that I could send another PR for as I hit those cases 😃)

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

Successfully merging a pull request may close this issue.

2 participants