Skip to content

Web IDE cannot open branches containing a '|' character

Summary

The WebIDE will fail to load a branch that contains a | in its name, displaying error Branch <START_NAME>%7<END_NAME> was not found in this project's repository.

The problem can be worked around by viewing an file and then starting the WebIDE from there.

This is very similar to #35473 (closed), which occurred with # character.

Steps to reproduce

  1. Create a branch names yes|no
  2. Switch to this branch on the main project page
  3. Click the WebIDE button
  • The WebIDe will start to load, then fail with the error above

Example Project

https://gitlab.com/wchandler/branch-name-pipe

What is the current bug behavior?

Branches with a pipe in their name cannot be loaded

What is the expected correct behavior?

All branches can be loaded in the WebIDE

Relevant logs and/or screenshots

Screen_Shot_2021-04-30_at_2.26.40_PM

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Expand for output related to GitLab environment info

System information
System:
Proxy:          no
Current User:   git
Using RVM:      no
Ruby Version:   2.7.2p137
Gem Version:    3.1.4
Bundler Version:2.1.4
Rake Version:   13.0.3
Redis Version:  6.0.10
Git Version:    2.31.1
Sidekiq Version:5.2.9
Go Version:     unknown

GitLab information
Version:        13.11.1-ee
Revision:       557bbaae5b1
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     12.6
Elasticsearch:  yes
Geo:            no
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version:        13.17.0
Repository storage paths:
- default:      /var/opt/gitlab/git-data/repositories
- remote:       /var/opt/gitlab/git-data/repositories
- nfs:  /mnt/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 >= 13.17.0 ? ... OK (13.17.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 remote ... OK nfs ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/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: ... 1/400 ... yes 1/401 ... yes 1/402 ... yes 1/403 ... yes 25/404 ... yes 1/407 ... yes 25/408 ... yes 1/411 ... yes 1/416 ... yes 1/417 ... yes 1/419 ... yes 1/421 ... yes 1/422 ... yes 11/423 ... yes 8/424 ... yes 1/425 ... yes 1/426 ... yes 1/427 ... yes 1/428 ... yes 1/429 ... yes 1/430 ... yes 1/431 ... yes 1/432 ... yes 1/433 ... yes 1/434 ... yes 1/435 ... yes 1/436 ... yes 1/437 ... yes 3/438 ... yes 4/439 ... yes 1/440 ... yes 1/441 ... yes 3/442 ... yes 3/443 ... yes 47/444 ... yes 46/445 ... yes 1/446 ... yes 46/447 ... yes 46/448 ... yes 46/449 ... yes 46/450 ... yes 46/451 ... yes 46/452 ... yes 46/453 ... yes 46/454 ... yes 46/455 ... yes 46/456 ... yes 46/457 ... yes 1/458 ... yes 13/459 ... yes 20/460 ... yes Redis version >= 5.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.2) Git version >= 2.31.0 ? ... yes (2.31.1) Git user has default SSH configuration? ... yes Active users: ... 12 Is authorized keys file accessible? ... yes Elasticsearch version 7.x (6.4 - 6.x deprecated to be removed in 13.8)? ... yes (7.9.1)

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished