{"action":"created","issue":{"url":"https://api.github.com/repos/go-gitea/git/issues/125","repository_url":"https://api.github.com/repos/go-gitea/git","labels_url":"https://api.github.com/repos/go-gitea/git/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/go-gitea/git/issues/125/comments","events_url":"https://api.github.com/repos/go-gitea/git/issues/125/events","html_url":"https://github.com/go-gitea/git/issues/125","id":333533510,"node_id":"MDU6SXNzdWUzMzM1MzM1MTA=","number":125,"title":"Gitea crashes in \"code.gitea.io/git/commit_info.go:218 +0x288\"","user":{"login":"ganto","id":1031031,"node_id":"MDQ6VXNlcjEwMzEwMzE=","avatar_url":"https://avatars2.githubusercontent.com/u/1031031?v=4","gravatar_id":"","url":"https://api.github.com/users/ganto","html_url":"https://github.com/ganto","followers_url":"https://api.github.com/users/ganto/followers","following_url":"https://api.github.com/users/ganto/following{/other_user}","gists_url":"https://api.github.com/users/ganto/gists{/gist_id}","starred_url":"https://api.github.com/users/ganto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganto/subscriptions","organizations_url":"https://api.github.com/users/ganto/orgs","repos_url":"https://api.github.com/users/ganto/repos","events_url":"https://api.github.com/users/ganto/events{/privacy}","received_events_url":"https://api.github.com/users/ganto/received_events","type":"User","site_admin":false},"labels":[{"id":476161331,"node_id":"MDU6TGFiZWw0NzYxNjEzMzE=","url":"https://api.github.com/repos/go-gitea/git/labels/kind/bug","name":"kind/bug","color":"ee0701","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-19T06:22:15Z","updated_at":"2018-06-19T16:45:45Z","closed_at":null,"author_association":"NONE","body":"I have a self-hosted gitea instance (currently v1.4.2) where I'm trying to import all my old git repositories. However, I found one that can crash the gitea instance when accessing it through the Web interface:\r\n```\r\nJun 18 18:15:51 example.com gitea[13177]: [Macaron] 2018-06-18 18:15:51: Started GET /gentoo for 192.168.10.71\r\nJun 18 18:15:51 example.com gitea[13177]: [Macaron] 2018-06-18 18:15:51: Completed GET /gentoo 200 OK in 12.11036ms\r\nJun 18 18:15:54 example.com gitea[13177]: [Macaron] 2018-06-18 18:15:54: Started GET /gentoo/linuxmonk-legacy for 192.168.10.71                                \r\nJun 18 18:15:54 example.com gitea[13177]: panic: runtime error: slice bounds out of range\r\nJun 18 18:15:54 example.com gitea[13177]: goroutine 523 [running]:\r\nJun 18 18:15:54 example.com gitea[13177]: code.gitea.io/gitea/vendor/code.gitea.io/git.newSignatureFromCommitline(0xc4209f4c65, 0x2f, 0x59b, 0x6, 0xffffffffffffffff, 0x6)\r\nJun 18 18:15:54 example.com gitea[13177]:         /var/tmp/portage/www-apps/gitea-1.4.2/work/gitea-1.4.2/src/code.gitea.io/gitea/vendor/code.gitea.io/git/signature.go:35 +0x460 \r\nJun 18 18:15:54 example.com gitea[13177]: code.gitea.io/gitea/vendor/code.gitea.io/git.parseCommitData(0xc4209f4c00, 0x103, 0x600, 0xc4209f4c00, 0x103, 0x600) \r\nJun 18 18:15:54 example.com gitea[13177]:         /var/tmp/portage/www-apps/gitea-1.4.2/work/gitea-1.4.2/src/code.gitea.io/gitea/vendor/code.gitea.io/git/repo_commit.go:69 +0x347\r\nJun 18 18:15:54 example.com gitea[13177]: code.gitea.io/gitea/vendor/code.gitea.io/git.(*Repository).getCommit(0xc420bd7d20, 0x16c4d394af667a84, 0xd430b22f4b726107, 0xd430b22f92755719, 0x92755719, 0x0, 0x0)\r\nJun 18 18:15:54 example.com gitea[13177]:         /var/tmp/portage/www-apps/gitea-1.4.2/work/gitea-1.4.2/src/code.gitea.io/gitea/vendor/code.gitea.io/git/repo_commit.go:113 +0x370\r\nJun 18 18:15:54 example.com gitea[13177]: code.gitea.io/gitea/vendor/code.gitea.io/git.targetedSearch(0xc420c04550, 0xc421860c00)\r\nJun 18 18:15:54 example.com gitea[13177]:         /var/tmp/portage/www-apps/gitea-1.4.2/work/gitea-1.4.2/src/code.gitea.io/gitea/vendor/code.gitea.io/git/commit_info.go:93 +0x1fa\r\nJun 18 18:15:54 example.com gitea[13177]: created by code.gitea.io/gitea/vendor/code.gitea.io/git.getCommitsInfo\r\nJun 18 18:15:54 example.com gitea[13177]:         /var/tmp/portage/www-apps/gitea-1.4.2/work/gitea-1.4.2/src/code.gitea.io/gitea/vendor/code.gitea.io/git/commit_info.go:218 +0x288\r\n```\r\n\r\nThis only happens with this individual repository, so there must be somehow an issue with parsing the git metadata. A regular git client can handle the repository without issue.\r\n\r\nI could reproduce the issue on `try.gitea.io` where I created the [commitsegv](https://try.gitea.io/commitsegv/commitsegv) repository a few minutes ago. If you want to check the logs: Jun 19, 2018 ~08:10h CEST.\r\n\r\nThe git repository which is able to crash gitea is also available [here](https://linuxmonk.ch/overlay). To reproduce the bug, enter the URL in a new gitea migrate screen and after the repository is migrated, try to access the Web interface.\r\n\r\nIf you need more information, please let me know."},"comment":{"url":"https://api.github.com/repos/go-gitea/git/issues/comments/398466980","html_url":"https://github.com/go-gitea/git/issues/125#issuecomment-398466980","issue_url":"https://api.github.com/repos/go-gitea/git/issues/125","id":398466980,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODQ2Njk4MA==","user":{"login":"ganto","id":1031031,"node_id":"MDQ6VXNlcjEwMzEwMzE=","avatar_url":"https://avatars2.githubusercontent.com/u/1031031?v=4","gravatar_id":"","url":"https://api.github.com/users/ganto","html_url":"https://github.com/ganto","followers_url":"https://api.github.com/users/ganto/followers","following_url":"https://api.github.com/users/ganto/following{/other_user}","gists_url":"https://api.github.com/users/ganto/gists{/gist_id}","starred_url":"https://api.github.com/users/ganto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganto/subscriptions","organizations_url":"https://api.github.com/users/ganto/orgs","repos_url":"https://api.github.com/users/ganto/repos","events_url":"https://api.github.com/users/ganto/events{/privacy}","received_events_url":"https://api.github.com/users/ganto/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T16:45:45Z","updated_at":"2018-06-19T16:45:45Z","author_association":"NONE","body":"After building gitea locally on my machine and starting it directly from the build directory, the following message was giving additional hints to nail down the culprit:\r\n```\r\n[git-module] /home/user/gitea-repositories/gentoo/linuxmonk-legacy.git: git -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= -c filter.lfs.required= -c \r\nfilter.lfs.smudge= -c filter.lfs.clean= cat-file -p 847a66af94d3c4160761724b2fb230d419577592                                                                              \r\n[git-module] stdout:                                                                                                                                                      \r\ntree a159359744f49a246da1ef076d4c152ab2890791                                                                                                                            \r\nparent fd27eadd7d85ebb13b96e969806027b458427eae                                                                                                                          \r\nauthor <user@example.com> 1278795400 -0000                                                                                                                   \r\ncommitter <user@example.com> 1278795400 -0000                                                                                                                \r\n                                                                                                                                                                         \r\nupdate manifest                                                                                                                                                          \r\n                                                                                                                                                                         \r\nsvn path=/portage/; revision=1761                                                                                                                                        \r\n                                                                                                                                                                         \r\npanic: runtime error: slice bounds out of range\r\n```\r\nThis part of the repository was originally converted to git from svn and for an unknown reason is missing the name portion in the author and committer fields.\r\n\r\nI'm not super fluent in reading go code, but might it be, that this module is not able to handle this case?"}}
{"actor":{"display_login":"ganto"}}