mirror of
https://github.com/go-gitea/gitea
synced 2024-11-25 16:02:51 +01:00
Fix GPG subkey verify (#30193)
Fixes #30189 Can't verify subkeys if they are not loaded.
This commit is contained in:
parent
7eb3ab0765
commit
82ffd91607
1 changed files with 4 additions and 0 deletions
|
@ -46,6 +46,10 @@ func VerifyGPGKey(ctx context.Context, ownerID int64, keyID, token, signature st
|
||||||
return "", ErrGPGKeyNotExist{}
|
return "", ErrGPGKeyNotExist{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := key.LoadSubKeys(ctx); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
sig, err := extractSignature(signature)
|
sig, err := extractSignature(signature)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", ErrGPGInvalidTokenSignature{
|
return "", ErrGPGInvalidTokenSignature{
|
||||||
|
|
Loading…
Reference in a new issue