Skip to content

RPM Registry 404 when package name contains 'package' #37086

@Rohansguliani

Description

@Rohansguliani

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions