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

GPG commit validation causes nil pointer dereference in API #1383

Closed
2 of 7 tasks
cybe opened this issue Mar 25, 2017 · 0 comments · Fixed by #1451
Closed
2 of 7 tasks

GPG commit validation causes nil pointer dereference in API #1383

cybe opened this issue Mar 25, 2017 · 0 comments · Fixed by #1451
Labels
Milestone

Comments

@cybe
Copy link
Contributor

cybe commented Mar 25, 2017

Description

Since the introduction of the GPG commit validation feature in commit 14fe901, getting branch information through the API causes a nil pointer dereference for unsigned commits.

The originating cause is located in routers/api/v1/convert/convert.go. Because the commit is not signed (verif.Verified is false), c.Signature is not initialized and cause the error.

There needs to be an appropriate safe guard for unsigned commits.

@lunny lunny added this to the 1.2.0 milestone Mar 26, 2017
@lunny lunny added the type/bug label Mar 26, 2017
@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.

2 participants