Skip to content

Tags with % cause an error #6321

@jeblair

Description

@jeblair
  • Gitea version (or commit ref): 91775c1 (latest on try.gitea.io)
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

Git supports "%" in ref names, but Gitea rejects them. In the web UI, creating a tag with the name "debian/1%1.6.0-2" produces the error "TagName must be a well-formed Git reference name." When attempting to push the same tag to a repo, the following error appears:

2019/03/13 18:20:55 [...io/gitea/cmd/hook.go:109 runHookPreReceive()] [F] retrieve protected branches information failed: parse https://localhost:3000/api/internal/branch/620/refs/tags/debian/1%!.(MISSING)0-2: invalid URL escape "%!"(MISSING)

We can confirm that git supports a ref with "%" by either creating a tag with git or running:

git check-ref-format "debian/1%1.6.0-2"

Screenshots

https://screenshots.firefox.com/u1vElZ2A4wLQeXIk/try.gitea.io

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions