Bad request returned on view file with spaces in name
Summary
GitLab CE 12.7.5 cannot show content of files with space in their names.
Steps to reproduce
In the web interface of GitLab 12.7.5, browse a repository, locate a file with space in its name. Click on that file to view its content.
What is the current bug behavior?
GitLab returns: 400 Bad Request
What is the expected correct behavior?
Show the content of the file, or offer the user to download the file.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Current User: git Using RVM: no Ruby Version: 2.6.5p114 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.7 Git Version: 2.24.1 Sidekiq Version:5.2.7 Go Version: unknownGitLab information Version: 12.7.5 Revision: b0fe37ef58e Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: http://sdfe-git HTTP Clone URL: http://sdfe-git/some-group/some-project.git SSH Clone URL: git@sdfe-git:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 11.0.0 Repository storage paths:
- default: /git/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 11.0.0 ? ... OK (11.0.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 100 users of 100 limit.
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 10/3 ... yes 17/6 ... yes 3/7 ... yes 8/8 ... yes 10/9 ... yes 15/11 ... yes 27/13 ... yes 15/14 ... yes 21/15 ... yes 21/19 ... yes 17/20 ... yes 32/21 ... yes 31/23 ... yes 38/24 ... yes 37/25 ... yes 34/26 ... yes 10/29 ... yes 10/30 ... yes 33/31 ... yes 34/32 ... yes 55/33 ... yes 55/36 ... yes 58/37 ... yes 58/38 ... yes 36/39 ... yes 36/40 ... yes 10/41 ... yes 58/42 ... yes 57/43 ... yes 10/45 ... yes 64/47 ... yes 64/48 ... yes 61/49 ... yes 76/50 ... yes 10/53 ... yes 81/54 ... yes 82/55 ... yes 84/56 ... yes 81/58 ... yes 35/60 ... yes 84/61 ... yes 84/62 ... yes 84/63 ... yes 79/65 ... yes 24/66 ... yes 84/67 ... yes 71/68 ... yes 89/70 ... yes 24/71 ... yes 58/72 ... yes 95/73 ... yes 95/74 ... yes 99/77 ... yes 99/78 ... yes 99/79 ... yes 99/80 ... yes 99/81 ... yes 99/82 ... yes 99/83 ... yes 99/84 ... yes 99/85 ... yes 99/86 ... yes 99/87 ... yes 99/88 ... yes 99/89 ... yes 99/90 ... yes 99/91 ... yes 82/92 ... yes 82/93 ... yes 82/94 ... yes 58/95 ... yes 10/96 ... yes 58/97 ... yes 58/99 ... yes 58/100 ... yes 58/101 ... yes 58/102 ... yes 109/103 ... yes 58/105 ... yes 57/106 ... yes 81/107 ... yes 24/108 ... yes 24/109 ... yes 112/110 ... yes 60/111 ... yes 114/112 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.5) Git version >= 2.22.0 ? ... yes (2.24.1) Git user has default SSH configuration? ... yes Active users: ... 82 Is authorized keys file accessible? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished