From 82ffd91607ba03907ebad31ec9a38555b153a331 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Sun, 31 Mar 2024 04:35:19 +0200 Subject: [PATCH] Fix GPG subkey verify (#30193) Fixes #30189 Can't verify subkeys if they are not loaded. --- models/asymkey/gpg_key_verify.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/asymkey/gpg_key_verify.go b/models/asymkey/gpg_key_verify.go index 4cf46ab55..01812a2d5 100644 --- a/models/asymkey/gpg_key_verify.go +++ b/models/asymkey/gpg_key_verify.go @@ -46,6 +46,10 @@ func VerifyGPGKey(ctx context.Context, ownerID int64, keyID, token, signature st return "", ErrGPGKeyNotExist{} } + if err := key.LoadSubKeys(ctx); err != nil { + return "", err + } + sig, err := extractSignature(signature) if err != nil { return "", ErrGPGInvalidTokenSignature{