Faulty display of commits when no user is logged in #65

Closed
opened 2025-11-02 03:07:10 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @pmattern on GitHub (Nov 17, 2016).

  • Gitea version (or commit ref): 871c964
  • Git version: 2.10.2
  • Operating system: Arch Linux, Debian stretch (testing)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Browser: Chromium 54.0.2840.100, Firefox 50.0

The display of particular commits in Gitea's Web-UI is faulty when no user is logged in.

Steps to reproduce:

  1. Launch a browser, navigate to a Gitea instance, say gitea.example.org, and make sure no user is logged in.
  2. View a particular repository, say gitea.example.org/foo/bar, click on "Commits" (→ gitea.example.org/foo/bar/commits/master).
  3. Click on an arbitrary commit hash in column "SHA1" (→ gitea.example.org/foo/bar/commit/<hash>). Instead of the usual diff-like view there's an error message in Chromium while Firefox either displays an empty page or offers to download some gzip archive. Regarding Firefox I failed to figure out what is triggering which of the two alternatives so far.
  4. Log in, repeat steps 2.-3. The commit will be displayed as expected.

The findings are the same when a repository is created from scratch by the Web-UI of Gitea or when a preexisting repository is pushed to Gitea. Problem seems to be a regression as it couldn't be seen with Gogs version 0.9.99.0915 (according to gogs --version).

Originally created by @pmattern on GitHub (Nov 17, 2016). - Gitea version (or commit ref): 871c964 - Git version: 2.10.2 - Operating system: Arch Linux, Debian stretch (testing) - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] SQLite - Browser: Chromium 54.0.2840.100, Firefox 50.0 The display of particular commits in Gitea's Web-UI is faulty when no user is logged in. Steps to reproduce: 1. Launch a browser, navigate to a Gitea instance, say gitea.example.org, and make sure no user is logged in. 1. View a particular repository, say gitea.example.org/foo/bar, click on "Commits" (→ gitea.example.org/foo/bar/commits/master). 1. Click on an arbitrary commit hash in column "SHA1" (→ gitea.example.org/foo/bar/commit/\<hash\>). Instead of the usual diff-like view there's an error message in Chromium while Firefox either displays an empty page or offers to download some gzip archive. Regarding Firefox I failed to figure out what is triggering which of the two alternatives so far. 1. Log in, repeat steps 2.-3. The commit will be displayed as expected. The findings are the same when a repository is created from scratch by the Web-UI of Gitea or when a preexisting repository is pushed to Gitea. Problem seems to be a regression as it couldn't be seen with Gogs version 0.9.99.0915 (according to `gogs --version`).
GiteaMirror added the type/bug label 2025-11-02 03:07:10 -06:00
Author
Owner

@ghost commented on GitHub (Nov 18, 2016):

Is this repository-specific? Are you able to provide any logs?

@ghost commented on GitHub (Nov 18, 2016): Is this repository-specific? Are you able to provide any logs?
Author
Owner

@pmattern commented on GitHub (Nov 18, 2016):

The finding is not repository specific in any way, and I've made it on several instances which were set up by different people.

Even with LEVEL = Trace there's nothing in the logs which looks suspicious to me. But following the steps depicted above the problem is 100% reproducible so it's probably easier you have a look at the logs of a Gitea instance you have at hand yourself.

@pmattern commented on GitHub (Nov 18, 2016): The finding is not repository specific in any way, and I've made it on several instances which were set up by different people. Even with `LEVEL = Trace` there's nothing in the logs which looks suspicious to me. But following the steps depicted above the problem is 100% reproducible so it's probably easier you have a look at the logs of a Gitea instance you have at hand yourself.
Author
Owner

@pmattern commented on GitHub (Nov 20, 2016):

Confirming the problem is solved in bd13c81. Thanks for the quick fix!

@pmattern commented on GitHub (Nov 20, 2016): Confirming the problem is solved in bd13c81. Thanks for the quick fix!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#65