Skip to content

Commit e581efe

Browse files
GiteaBotKN4CK3R
andauthored
Fix GPG subkey verify (#30193) (#30203)
Backport #30193 by @KN4CK3R Fixes #30189 Can't verify subkeys if they are not loaded. Co-authored-by: KN4CK3R <[email protected]>
1 parent cd11786 commit e581efe

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)