Skip to content

Commit

Permalink
fix(server): absence of signatures in git notes not handled properly
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Igrychev <[email protected]>
  • Loading branch information
alexey-igrychev committed Feb 4, 2022
1 parent 6c345a5 commit 2bea1f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/pkg/git/signatures.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ func VerifyCommitSignatures(repo *git.Repository, commit string, trustedPGPPubli
func verifyObjectSignatures(repo *git.Repository, objectID string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int) error {
signatures, err := objectSignaturesFromNotes(repo, objectID)
if err != nil {
if strings.HasSuffix(err.Error(), plumbing.ErrObjectNotFound.Error()) {
return NewNotEnoughVerifiedPGPSignaturesError(requiredNumberOfVerifiedSignatures)
}

return err
}

Expand Down

0 comments on commit 2bea1f4

Please sign in to comment.