404 in 1.20.1 when branch name contains # #11317

Closed
opened 2025-11-02 09:34:12 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @dusatvoj on GitHub (Jul 24, 2023).

Description

I did an upgrade to gitea 1.20.1 (from 1.19.x) and now I'm facing the issue with WebUI - it's returning 404 when branch name contains #.

Link contains unescaped # ( ...branch#130... ) - it could cause the problem 🤔

It's pretty severe bug bcs we are using reference of issue in branch name, so almost every branch has # in it's name 🙈

Gitea Version

1.20.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Debian 11

How are you running Gitea?

Built from source, run by systemd, proxied by external nginx.

Database

PostgreSQL

Originally created by @dusatvoj on GitHub (Jul 24, 2023). ### Description I did an upgrade to gitea 1.20.1 (from 1.19.x) and now I'm facing the issue with WebUI - it's returning 404 when branch name contains `#`. Link contains unescaped `#` ( `...branch#130...` ) - it could cause the problem :thinking: It's pretty severe bug bcs we are using reference of issue in branch name, so almost every branch has `#` in it's name :see_no_evil: ### Gitea Version 1.20.1 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Debian 11 ### How are you running Gitea? Built from source, run by systemd, proxied by external nginx. ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 09:34:12 -06:00
Author
Owner

@stuzer05 commented on GitHub (Jul 24, 2023):

Same here, problem is still present on latest dev commit.

image
image

@stuzer05 commented on GitHub (Jul 24, 2023): Same here, problem is still present on latest dev commit. ![image](https://github.com/go-gitea/gitea/assets/23124682/c408133d-d813-414e-93f0-57389dbbf7c5) ![image](https://github.com/go-gitea/gitea/assets/23124682/1b82ec45-e5c5-4010-bdef-86e64edf7a7a)
Author
Owner

@silverwind commented on GitHub (Jul 24, 2023):

Should be fixed when https://github.com/go-gitea/gitea/pull/25875 is backported.

@silverwind commented on GitHub (Jul 24, 2023): Should be fixed when https://github.com/go-gitea/gitea/pull/25875 is backported.
Author
Owner

@lunny commented on GitHub (Jul 25, 2023):

Closed as #26103 merged.

@lunny commented on GitHub (Jul 25, 2023): Closed as #26103 merged.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11317