Skip to content

Weird HTTP code when invalid tag name is provided #30959

Closed
@sadorowo

Description

@sadorowo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions