Skip to content
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

Error in Tree Listing #2064

Closed
2 of 6 tasks
shyim opened this issue Jun 26, 2017 · 9 comments
Closed
2 of 6 tasks

Error in Tree Listing #2064

shyim opened this issue Jun 26, 2017 · 9 comments
Labels
Milestone

Comments

@shyim
Copy link
Contributor

shyim commented Jun 26, 2017

Description

After switching 5 level on webinterface it responds with a 500 exception. I can share a account private on discord to access the gitea server.

@lafriks
Copy link
Member

lafriks commented Jun 26, 2017

Seems to be working fine - https://try.gitea.io/lafriks/test/src/test_levels

@shyim
Copy link
Contributor Author

shyim commented Jun 26, 2017

I pushed it as private repository on https://try.gitea.io/shyimtest/gs/src/master/src/GSS/Component/Hosting/Gameserver/Games it crashes also :)
I guess admins can access also private repositories

@bkcsoft
Copy link
Member

bkcsoft commented Jun 26, 2017

I guess admins can access also private repositories

Indeed we can 😉 (But we can also check logs which is usually more useful :trollface: )

[Macaron] PANIC: runtime error: slice bounds out of range
/usr/lib/go/src/runtime/panic.go:489 (0x557d0971a0d3)
/usr/lib/go/src/runtime/panic.go:35 (0x557d09718d80)
/srv/app/src/code.gitea.io/gitea/vendor/code.gitea.io/git/tree_entry.go:222 (0x557d09ae2450)
/srv/app/src/code.gitea.io/gitea/vendor/code.gitea.io/git/tree_entry.go:267 (0x557d09ae269c)
/srv/app/src/code.gitea.io/gitea/vendor/code.gitea.io/git/tree_entry.go:239 (0x557d09ae24bd)
/srv/app/src/code.gitea.io/gitea/vendor/code.gitea.io/git/tree_entry.go:179 (0x557d09ae1a96)
/srv/app/src/code.gitea.io/gitea/routers/repo/view.go:51 (0x557d0a1646e0)
/srv/app/src/code.gitea.io/gitea/routers/repo/view.go:308 (0x557d0a168a30)
/srv/app/src/code.gitea.io/gitea/routers/repo/view.go:262 (0x557d0a1685ba)
/usr/lib/go/src/runtime/asm_amd64.s:514 (0x557d0974758a)
/usr/lib/go/src/reflect/value.go:434 (0x557d097aa391)
/usr/lib/go/src/reflect/value.go:302 (0x557d097a9936)
/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x557d09b48ed1)
/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x557d09b4888c)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x557d09b75d24)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 (0x557d09b75c48)
/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:186 (0x557d09bcdde2)
/usr/lib/go/src/runtime/asm_amd64.s:514 (0x557d0974758a)
/usr/lib/go/src/reflect/value.go:434 (0x557d097aa391)
/usr/lib/go/src/reflect/value.go:302 (0x557d097a9936)
/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x557d09b48ed1)
/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x557d09b4888c)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x557d09b75d24)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 (0x557d09b75c48)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/recovery.go:161 (0x557d09b88fad)
/usr/lib/go/src/runtime/asm_amd64.s:514 (0x557d0974758a)
/usr/lib/go/src/reflect/value.go:434 (0x557d097aa391)
/usr/lib/go/src/reflect/value.go:302 (0x557d097a9936)
/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x557d09b48ed1)
/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x557d09b4888c)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x557d09b75d24)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 (0x557d09b75c48)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/logger.go:43 (0x557d09b88266)
/usr/lib/go/src/runtime/asm_amd64.s:514 (0x557d0974758a)
/usr/lib/go/src/reflect/value.go:434 (0x557d097aa391)
/usr/lib/go/src/reflect/value.go:302 (0x557d097a9936)
/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x557d09b48ed1)
/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x557d09b4888c)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x557d09b75d24)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:184 (0x557d09b8a28b)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:288 (0x557d09b822ef)
/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/macaron.go:177 (0x557d09b7a1fe)
/srv/app/src/code.gitea.io/gitea/vendor/github.com/gorilla/context/context.go:141 (0x557d09dd4ded)
/usr/lib/go/src/net/http/server.go:1942 (0x557d099c4936)
/usr/lib/go/src/net/http/server.go:2568 (0x557d099c7214)
/usr/lib/go/src/net/http/server.go:1825 (0x557d099c3484)
/usr/lib/go/src/runtime/asm_amd64.s:2197 (0x557d09749d51)
[Macaron] 2017-06-26 20:25:00: Completed /shyimtest/gs/src/master/src/GSS/Component/Hosting/Gameserver/Games 500 Internal Server Error in 381.292503ms

Another fun thing I notices is that I don't actually get any output in the browser from that link 🤔
While I should be presented with a 500-page it doesn't return any payload at all:

Content-Type		"text/plain; charset=utf-8"
Date			"Mon, 26 Jun 2017 20:27:45 GMT"
x-frame-options		"SAMEORIGIN"
Content-Length		"0" <-- HERE
X-Firefox-Spdy		"h2"

@bkcsoft
Copy link
Member

bkcsoft commented Jun 26, 2017

It's exploading here because we're not checking that entryPath[entryNameStartIndex:] is a valid index 🙄

@lafriks
Copy link
Member

lafriks commented Jun 26, 2017

it's actually exploding because instead of path we are getting commit hash that of course does not have any slash in it. I'm debugging this issue right now

@lafriks
Copy link
Member

lafriks commented Jun 26, 2017

Problem is in log command that is returning merges that by them self does not have any files so we are getting two hashes in the row, so git log command for dir listing must be called with --no-merges

@andreynering
Copy link
Contributor

/cc @ethantkoenig

@lunny
Copy link
Member

lunny commented Jun 28, 2017

resolved by #2074

@lunny lunny closed this as completed Jun 28, 2017
@lafriks
Copy link
Member

lafriks commented Jun 28, 2017

Just tested and issue is resolved in master branch 👍

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

Successfully merging a pull request may close this issue.

5 participants