The colon punctuation character in a file name prevents WebIDE from displaying the actual file
Summary
Assuming a file contains the :
(colon punctuation character) in the file name, when that file is opened in the WebIDE, it results in the :
getting replaced with %3A
causing WebIDE to open a new, blank file, instead of the intended file.
For instance, in testing, A test file called Test:File
was created. When navigating to the file in the test project, then clicking the WebIDE button to edit the file, WebIDE opens the file as a new file called Test%3AFile
. It appears this character is getting URL encoded.
Steps to reproduce
- Create a new file in a project with
:
in the file name. - Open that file in WebIDE.
Example Project
An example can be viewed here: https://gitlab.com/john_long/webide-test-project/-/blob/master/Test:File
What is the current bug behavior?
The colon punctuation character(:
) is getting encoded to %3A
.
What is the expected correct behavior?
Files with a :
in the name should open for editing in WebIDE.
Relevant logs and/or screenshots
Output of checks
This bug happens on both GitLab.com and self-managed.
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)