Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird HTTP code when invalid tag name is provided #30959

Closed
sadorowo opened this issue May 13, 2024 · 0 comments · Fixed by #30962
Closed

Weird HTTP code when invalid tag name is provided #30959

sadorowo opened this issue May 13, 2024 · 0 comments · Fixed by #30962
Labels

Comments

@sadorowo
Copy link

sadorowo commented 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

lunny pushed a commit that referenced this issue May 14, 2024
Fixes #30959

Adds an API test for protected tags.
Fix existing tag in combination with fixtures.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue May 14, 2024
Fixes go-gitea#30959

Adds an API test for protected tags.
Fix existing tag in combination with fixtures.
KN4CK3R added a commit that referenced this issue May 14, 2024
Backport #30962 by @KN4CK3R

Fixes #30959

Adds an API test for protected tags.
Fix existing tag in combination with fixtures.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant