Skip to content

500/RuntimeError while browsing organization repo list #7001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 7 tasks
philippbeckmann opened this issue May 20, 2019 · 13 comments
Closed
2 of 7 tasks

500/RuntimeError while browsing organization repo list #7001

philippbeckmann opened this issue May 20, 2019 · 13 comments
Labels
Milestone

Comments

@philippbeckmann
Copy link
Contributor

Description

When browsing an organization and switching to another page, an error 500 is displayed. The log reports "runtime error: invalid memory address or nil pointer dereference" (see gist).

Screenshots

@trgwii
Copy link

trgwii commented May 20, 2019

I'm having the same issue! Have had it for a while, but until Gitea 1.8.1, the IIS reverse proxy overtook the error page, which led me to believe IIS was doing something funky with that specific response from Gitea (Page 2 or more on any organization page). With 1.8.1 the Gitea 500 page is shown instead.

Another interesting quirk is that you have to be signed in for the error to occur.

My setup:

Gitea: 1.7.6, 1.8.1
Git version: git version 2.18.0.windows.1
Operating system: Windows Server 2012 Standard
Database: MSSQL

@philippbeckmann
Copy link
Contributor Author

I just found out that the problem does not occur to admin users. Only non-admin users are affected??!?

@trgwii
Copy link

trgwii commented May 20, 2019

Confirmed, same result here.

Logged out / anonymous: Works
Normal user: 500 error
Admin / root user: Works

funky bug

@philippbeckmann
Copy link
Contributor Author

philippbeckmann commented May 20, 2019

This corresponds to the code in

if ctx.IsSigned && !ctx.User.IsAdmin {

The stacktrace in my gist points to line 448

@lafriks
Copy link
Member

lafriks commented May 20, 2019

Could you check if branch https://github.com/lafriks/gitea/tree/backport/fix_repository_search fixes problem? I was not able to reproduce this problem locally

@lafriks
Copy link
Member

lafriks commented May 20, 2019

It could be that on master this problem is already fixed by #6897

@zeripath
Copy link
Contributor

I can backport that if liked

@lafriks
Copy link
Member

lafriks commented May 20, 2019

I have branch with backported changes already, I was just not able to reproduce issue, so I'm not sure if it actually fixes the problem :)

@philippbeckmann
Copy link
Contributor Author

Thank you, i'm just setting up a test environment to test a master build.

@philippbeckmann
Copy link
Contributor Author

The issue is fixed in the current master. Thank you.

@lafriks lafriks added this to the 1.8.2 milestone May 21, 2019
@lafriks
Copy link
Member

lafriks commented May 21, 2019

Please test with latest 1.8 build when drone has finished building

@philippbeckmann
Copy link
Contributor Author

This issue is fixed in the current 1.8 build.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants