Find file functionality issue
Summary
I have issue with results of Find file functionality connected to fact that all link represented on Find file which are in sub folders have URL encoded character / in %2F .
I use Apache server instead nginx from some authentication reason , and Apache server have different defaults from nginx.
Apache server by default treat URL encoded link like potential security risk and return 404 error code (before any module are able to work with link), it is possible to change that configuration using AllowEncodedSlashes ) on other hand nginx by default decode URL encoded link.
Is it possible to configure GitLAB to not create such a type of link (from my point of view it isnt clear way / is changed to URL encoded value od %2F).
Steps to reproduce
On last few version of gitlab-omnibus CE (Centos 7 package 64 bit) when use Apache 2.4 serevr instead of nginx from package gitlab-ce , on project page select Find file button.
.
Example Project
Not possible to replicate on GitLab.com
What is the current bug behavior?
Return 404 page becouse Apache server initiate 404 error code.
What is the expected correct behavior?
Return selected file (if I change %2F with / manualy in link i got selected file)
Relevant logs and/or screenshots
Results of GitLab environment info
Expand for output related to GitLab environment info
[root@gitlab ~]# gitlab-rake gitlab:env:infoSystem information System: Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 3.2.12 Git Version: 2.22.0 Sidekiq Version:5.2.7 Go Version: unknown
GitLab information Version: 12.4.1 Revision: 4281915cfeb Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: https://gitlab.pero.com HTTP Clone URL: https://gitlab.pero.com/some-group/some-project.git SSH Clone URL: git@gitlab.pero.com:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: shibboleth
GitLab Shell Version: 10.2.0 Repository storage paths: default: /var/opt/gitlab/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
[root@gitlab ~]# sudo gitlab-rake gitlab:check SANITIZE=true Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 10.2.0 ? ... OK (10.2.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: ... LDAP is disabled in config/gitlab.yml
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: ... 11/1 ... yes 12/2 ... yes 13/3 ... yes 14/5 ... yes 13/7 ... yes 18/10 ... yes 6/12 ... yes 18/13 ... yes 6/14 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.22.0 ? ... yes (2.22.0) Git user has default SSH configuration? ... yes Active users: ... 12 Is authorized keys file accessible? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
Use / instead of %2F in URL link to file.
/label ~bug
