Weird HTTP code when invalid tag name is provided #12989

Closed
opened 2025-11-02 10:27:02 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @sadorowo on GitHub (May 13, 2024).

Description

When I try to create tag with name that isn't allowed due to tag protection, I'm receiving 500 status code. I think it should be something like 401 (Unauthorized) or 400 (Bad request).

I've set up a step in my Gitea Action to create new release in my repository.
Honestly, when I saw "Internal Server Error" in my step logs I thought that something is wrong with my server.
But it was only poorly written regular expression.

Gitea Version

1.21.11

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

https://gist.github.com/sadorowo/2f212589fe30816f7d1d882d06fbdbda

Screenshots

Not related to web interface, but I've made request from Developer Tools

image

Git Version

2.40.1, Wire Protocol Version 2 Enabled

Operating System

Ubuntu 22.04.4 LTS x86_64

How are you running Gitea?

I'm using Docker Compose version of Gitea.

Database

PostgreSQL

Originally created by @sadorowo on GitHub (May 13, 2024). ### Description When I try to create tag with name that isn't allowed due to tag protection, I'm receiving 500 status code. I think it should be something like 401 (Unauthorized) or 400 (Bad request). I've set up a step in my Gitea Action to create new release in my repository. Honestly, when I saw "Internal Server Error" in my step logs I thought that something is wrong with my server. But it was only poorly written regular expression. ### Gitea Version 1.21.11 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist https://gist.github.com/sadorowo/2f212589fe30816f7d1d882d06fbdbda ### Screenshots Not related to web interface, but I've made request from Developer Tools ![image](https://github.com/go-gitea/gitea/assets/97941280/23725856-84cd-4ad8-b384-fafe03ec97d0) ### Git Version 2.40.1, Wire Protocol Version 2 Enabled ### Operating System Ubuntu 22.04.4 LTS x86_64 ### How are you running Gitea? I'm using Docker Compose version of Gitea. ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 10:27:02 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12989