Skip to content

sha256 repositories produce "404 Not Found" page #35242

@Jeremy-Bot

Description

@Jeremy-Bot

Description

Steps to reproduce:

  1. Create a new repository and select sha256 as Object Format.
  2. Create a pull request with at least 2 commits.
  3. Navigate to the pull request and select tab "Files Changed". ( https://<domain>/<organization>/<repo>/pulls/1/files )
  4. Open the "Filter by commit" dropdown menu and select a single commit.
  5. It will redirect to https://<domain>/<organization>/<repo>/pulls/1/commits/e2fab1b40c2b6cddc45a89d30c4e712a523adf7de82c8a944e19c5476bb304a6?....

Expected Behavior:
It shows the correct diffs of the selected commit.

Actual Behavior:
It shows a 404 page without the tab bar.

Image

Notes

  • The same procedure works correctly with sha1 repos.
  • While debugging I found, that if I shorten the redirect url to half the hash, it will at least show the tab bar, but still not find the commit.
Image

Gitea Version

1.24.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.49.1

Operating System

Ubuntu 24.04.2 LTS

How are you running Gitea?

Run from docker

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions