Description
When an RPM package name contains the word "package" (e.g., my-test-package), downloading the package with the filename appended to the URL fails with a 404 error.
This happens because the router's short route pattern for RPM downloads (/<group:*>/package/<name>/<version>/<architecture>) accidentally matches the long path (which includes the filename) by misinterpreting the "package" inside the name as the route delimiter.
Gitea Version
v1.25.4 (and main branch)
Can you reproduce the bug on the Gitea demo site?
No
How are you running Gitea?
KIND cluster (rootless image) and local development environment.
Database
SQLite (verified on SQLite, likely affects others as it is a routing issue).
Description
When an RPM package name contains the word "package" (e.g.,
my-test-package), downloading the package with the filename appended to the URL fails with a 404 error.This happens because the router's short route pattern for RPM downloads (
/<group:*>/package/<name>/<version>/<architecture>) accidentally matches the long path (which includes the filename) by misinterpreting the"package"inside the name as the route delimiter.Gitea Version
v1.25.4 (and main branch)
Can you reproduce the bug on the Gitea demo site?
No
How are you running Gitea?
KIND cluster (rootless image) and local development environment.
Database
SQLite (verified on SQLite, likely affects others as it is a routing issue).