Empty/404 on project details for projects with a name ending in `.json`
Summary
When a project repository path ends in .json
, the project details (base slug at /username/projectname
) fails to load and returns a 404. Other views, for example /activity
and /issues
are still rendered correctly when navigated to directly.
Steps to reproduce
- Create a new project with a valid name, like
test
. (Note that a project namedtest.json
can not be created and fails with a gitlab-shell error). - After the project is created, navigate the project settings.
- Change the "Repository path" to end with
.json
:test.json
. - Save the changes.
- Navigate to Project->Details.
What is the current bug behavior?
Visiting /username/test.json
in a browser displays a blank page. A 404 is reported in the browsers developer tools.
What is the expected correct behavior?
The project details should be returned and rendered.
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
- gitlab-ee:nightly: 11.5.0-pre 34888f9a
- Current gdk/gitlab: master@b875431ff35ccdfd59d99193d34ec59c8b3933fc
Possible fixes
Don't allow project slugs to end in .json
.