Can't create a release based on a Git tag that includes special characters
Summary
Git allows the creation of some pretty crazy tag names. For example, all of the following are valid tag names:
a/b
A/B
a/b/c/d
a/b.c
0/1/2
!/"#%&'{}+,-.<>;=@]_`{|}
🙂🚀😂🇺🇸💩🇨🇦💯👍🤦
(╯°□°)╯︵┻━┻
¯|_(ツ)_/¯
Our Tags page handles all of these edges cases properly, but if I attempt to create a release based on any of these tags (by adding content to the Release notes field when creating a tag), the page times out and the release isn't created (although the tag does get created).
Steps to reproduce
- Navigate to a project's Tags page.
- Click "New tag"
- Enter
🙂!/"#%&'{}+,-.<>;=@]_`{|}🚀
as the Tag's name - Add a tag message and release notes.
- Click "Create tag"
What is the current bug behavior?
The page times out after clicking "Create tag".
After navigating back to the Tags page, a new tag with the name 🙂!/"#%&'{}+,-.<>;=@]_`{|}🚀
will have been created, but no associated release will have been created (i.e. the will have no release notes, and no new release will be added to the Releases page).
Additionally, clicking the "Edit" button next to the tag on the Tags page will result in a 404.
What is the expected correct behavior?
The page should not time out after clicking "Create tag".
A release should be associated with the new tag. (I.e. the tag should have release notes and a new entry should be added to the Releases page.)
Clicking the tag's "Edit" button should not result in a 404.
Relevant logs and/or screenshots
Here is a screenshot of a tag I created with release notes. Notice how no release notes are shown:
Here is what happens if I click the "Edit" button shown in the screenshot above:
Related
Here's a blog post I wrote that has a number of examples of both valid and invalid tag names: https://nathanfriend.io/2019/10/19/ridiculous-refs.html
Output of checks
This bug happens on GitLab.com.