Creating a Release allowed to be created with a invalid tag name with spaces #1654

Closed
opened 2025-11-02 04:08:33 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @schnuffle on GitHub (Mar 27, 2018).

  • Gitea version (or commit ref): 1.4
  • Git version: 2.15.1
  • Operating system: Centos7 amd64
  • Database (use [x]):
    • [x ] PostgreSQL 10
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • [x ] No, URL returns error
    • Not relevant
  • Log gist:
    DeleteReleaseByID: git tag -d: exec(18:DeleteReleaseByID (git tag -d): 3) failed: exit status 1() stdout: stderr: error: Tag '0.3 a' nicht gefunden. - error: Tag '0.3 a' nicht gefunden.

Description

  • Create a new release with a new tag and use a tag name with a space "0.3 a"
  • Now we have a release draft, based on a non existing tag, that can't be deleted.

Screenshots

tagwithspace

tagwithspace-editrelease

tagwithspace-deleterelease

Originally created by @schnuffle on GitHub (Mar 27, 2018). - Gitea version (or commit ref): 1.4 - Git version: 2.15.1 - Operating system: Centos7 amd64 - Database (use `[x]`): - [x ] PostgreSQL 10 - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x ] No, URL returns error - [ ] Not relevant - Log gist: DeleteReleaseByID: git tag -d: exec(18:DeleteReleaseByID (git tag -d): 3) failed: exit status 1() stdout: stderr: error: Tag '0.3 a' nicht gefunden. - error: Tag '0.3 a' nicht gefunden. ## Description - Create a new release with a new tag and use a tag name with a space "0.3 a" - Now we have a release draft, based on a non existing tag, that can't be deleted. ## Screenshots ![tagwithspace](https://user-images.githubusercontent.com/5358397/37960925-2ce197a0-31b7-11e8-9717-3840821fb565.png) ![tagwithspace-editrelease](https://user-images.githubusercontent.com/5358397/37961231-0723cf32-31b8-11e8-9bcf-62d53ebde7b6.png) ![tagwithspace-deleterelease](https://user-images.githubusercontent.com/5358397/37961233-08df12d2-31b8-11e8-880c-82a9a7167eff.png)
GiteaMirror added the type/bug label 2025-11-02 04:08:33 -06:00
Author
Owner

@kolaente commented on GitHub (Mar 27, 2018):

When you try to release that tag, You get a 500 with an error message:

An error has occurred : exit status 128 - fatal: '0.3 a' ist kein gültiger Tagname. 

Apparantly validation works, but not when creating a draft which is weired.

@kolaente commented on GitHub (Mar 27, 2018): When you try to release that tag, You get a 500 with an error message: ```log An error has occurred : exit status 128 - fatal: '0.3 a' ist kein gültiger Tagname. ``` Apparantly validation works, but not when creating a draft which is weired.
Author
Owner

@schnuffle commented on GitHub (Mar 27, 2018):

Exactly,
now the question is, how can I delete that draft?

For me the error comes from trying to delete that invalid release draft but the real error comes beforehand.

@schnuffle commented on GitHub (Mar 27, 2018): Exactly, now the question is, how can I delete that draft? For me the error comes from trying to delete that invalid release draft but the real error comes beforehand.
Author
Owner

@schnuffle commented on GitHub (Mar 27, 2018):

Okay, for the people running into the same problem, I found a solution:

  • Find the faulty release in the database ( in my case select * from release where tag_name='0.3 a' )
  • Change the tag_name to a allowed tagname ( 0.3a )
  • Edit the release draft
  • Save it
  • Now the tag has been created and you can delete the release

Regards

Schnuffle

@schnuffle commented on GitHub (Mar 27, 2018): Okay, for the people running into the same problem, I found a solution: * Find the faulty release in the database ( in my case select * from release where tag_name='0.3 a' ) * Change the tag_name to a allowed tagname ( 0.3a ) * Edit the release draft * Save it * Now the tag has been created and you can delete the release Regards Schnuffle
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1654