Web IDE can't load branches with a `#` in branch name since 13.5

Summary

Prior to 13.5 we're able to click the Web IDE button on branch names which contains the # character. Now (13.5, 13.5.1 and 13.5.2 affected) it loads the Web IDE with the error message:

Branch Bugfix/7.2-%2395444 was not found in this project's repository.

Steps to reproduce

  1. Create/Push a branch name which contains the # character. (We used Bugfix/7.2-#95444 in this example)
  2. Go to the repository / files view and switch to the branch
  3. Hit the Web IDE button in the upper right
  4. Encounter the error message

What is the current bug behavior?

(see summary)

What is the expected correct behavior?

  1. Don't show the error message
  2. Load the branch into the Web IDE and allow working with it

Relevant logs and/or screenshots

2020-10-29_at_12.01.24_2x

Also relevant is the URL, since it looks like, the # char will not be en- or decoded correctly: https://gitlab.instance.tld/-/ide/project/group-name/project-name/edit/Bugfix/7.2-%252395444/-/

Output of checks

Results of GitLab environment info

We're using the latest version (13.5.2 as the time of writing) installed via omnibus-installer. But I can't disclose the output of sudo gitlab-rake gitlab:env:info since I'm not the one who's managing our GitLab instance.

Possible fixes

I guess this is a regression in the en- or decoding of the branch name from its URL.

Edited Oct 29, 2020 by Jens Kohl
Assignee Loading
Time tracking Loading