Web IDE incorrectly displays OAuth domain mismatch error when there are case sensitive differences
MR: Fix Web IDE Oauth domain mismatch screen (!167598 - merged)
Summary
If the Web IDE's OAuth application redirect URI contains a domain name GDK.TEST and the user attempts to access the Web IDE on gdk.test, the Web IDE displays the domain mismatch error UI:
This screen shouldn't appear based on whether the domain name in the Redirect URI is in lowercase or uppercase. Domain names are not case-sensitive.
Steps to reproduce
- Open the Web IDE's instance-wide OAuth application in the Admin page: https://gdk.test:3443/admin/applications
- Rewrite the domain name in the redirect URI so it is all uppercase.
- The Web IDE will display the domain mismatch UI seen in the screenshot above.
Example Project
You can use any project in a GitLab instance.
What is the current bug behavior?
The Web IDE will display the domain mismatch UI seen in the screenshot above when the domain name is uppercase in the OAuth application's configuration and it is lowercase in the web browser's URL.
What is the expected correct behavior?
The domain mismatch UI shouldn't appear, and the Web IDE opens successfully.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: \\\`sudo gitlab-rake gitlab:env:info\\\`) (For installations from source run and paste the output of: \\\`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\\\`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of: \`sudo gitlab-rake gitlab:check SANITIZE=true\`) (For installations from source run and paste the output of: \`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true\`) (we will only investigate if the tests are passing)
Possible fixes
Edited by Enrique Alcántara
