404 redirect requires sign-in
Summary
The 404 redirection requires sign-in. This might be valid for some pages, but most of the time it's annoying, and affects all gitlab pages.
Steps to reproduce
- Sign out of gitlab. (I suggest a private window, personally)
- Navigate to a page that does not exist (there's a few example 404 links below)
- Sign in
- Get 404
Example Project
All projects have the issue, as do all instances I've tried. So instead, here are a few types of links to try across different parts of GitLab.
Invalid commit url: https://gitlab.com/gitlab-org/gitlab/-/commit/9822
Note that the invalid commit url is different behavior than a syntactically-correct commit that doesn't exist like: https://gitlab.com/gitlab-org/gitlab/-/commit/9823ebb251f43cf15d77c047887c8843855053b7
Non-existent group: https://gitlab.com/not-a-real-group
Issues have the opposite path. A non-existent issue like https://gitlab.com/gitlab-org/gitlab/-/issues/54816476786 will re-direct to a 404 and so will an issue without access.
What is the current bug behavior?
Currently, a 404 first asks the user to sign-in to Gitlab, then re-directs the user to the 404 url. This can lead the user to believe that there is something to be found at the URL.
What is the expected correct behavior?
If the page doesn't exist, users should be directed to a 404 page without needing to sign in.
Relevant logs and/or screenshots
N/A
Output of checks
This bug happens on GitLab.com
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
Patch release information for backports
If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.
Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.
High-severity bug remediation
To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.