Skip to content

Commit bbd0ac1

Browse files
KN4CK3RGiteaBot
authored andcommitted
Fix GPG subkey verify (go-gitea#30193)
Fixes go-gitea#30189 Can't verify subkeys if they are not loaded.
1 parent 9d38c4d commit bbd0ac1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

models/asymkey/gpg_key_verify.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ func VerifyGPGKey(ctx context.Context, ownerID int64, keyID, token, signature st
4646
return "", ErrGPGKeyNotExist{}
4747
}
4848

49+
if err := key.LoadSubKeys(ctx); err != nil {
50+
return "", err
51+
}
52+
4953
sig, err := extractSignature(signature)
5054
if err != nil {
5155
return "", ErrGPGInvalidTokenSignature{

0 commit comments

Comments
 (0)