Skip to content

Fix front-end for branches that happen to contain urlencoding escape characters (e.g. %)

username-removed-128633 requested to merge 10772-fix-urlencoded-branchname into master

Originally opened at !3574 (closed) by @ewiltshi.


Adding a branch with a name like "foo%20bar" (via command-line) and setting it to the project's default branch causes the project "show" page to 404 for that project. "assign_ref_vars" unescapes the branch name ("foo%20bar" ==> "foo bar"), making GitLab look for a non-existent branch. This MR adds logic to skip the URL unescaping step in "assign_ref_vars".

Fixes #10772 (closed), #14992 (closed), #15304 (closed).

Does this MR meet the acceptance criteria?

Merge request reports