Links to internal and private repositories are not working from MS Office
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Links to internal and private repositories are not working from MS Office.
Steps to reproduce
- (Use any browser that is not IE as default browser)
- Use the URL of any private repository as a hyperlink in a MS Office application
- Click that Hyperlink
- I get redirected to the Dashboard with my default browser with the Message
You are already signed in.
Example Project
https://gitlab.com/fabio.zuber/internal-test-repo (Any project for which you need to login works)
What is the current bug behavior?
I get redirected to the Dashboard with my default browser with the Message
You are already signed in.
What is the expected correct behavior?
I get linked to the internal project.
Bug explanation
This is more of a problem from MS Office. But GitLab could maybe prevent this.
Some background on what happens: If I click on a hyperlink, MS Office uses IE to check if the URL is valid. The IE will follow redirects until it reaches a 200 or 400 response. In this case GitLab redirects to the login screen, since I want to access an internal repo and IE has no valid GitLab session. MS Office forwards the last response (the login page) to the default browser. Since I'm already logged in on my default browser I get redirected to the Dashboard.
More Info here: https://www.wimpyprogrammer.com/microsoft-office-link-pre-fetching-and-single-sign-on/
Relevant logs and/or screenshots
Workaround
Login to GitLab with IE before clicking the link.
Output of checks
This bug happens on GitLab.com
Possible fixes
This repo looks like something that fixes the problem: https://github.com/spilliton/fix_microsoft_links