pgp: fix crash on gpg decrypt fail
The gpg decrypt function was catching errors but not returning them. This patch returns errors that are caught instead of aerc panicking. Reported-by: ReK2 <rek2@hispagatos.org> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: ReK2 <rek2@hispagatos.org> Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
dbf52bb4b4
commit
21fca56292
1 changed files with 1 additions and 0 deletions
|
@ -26,6 +26,7 @@ func Decrypt(r io.Reader) (*models.MessageDetails, error) {
|
|||
md.Body = bytes.NewReader(orig)
|
||||
return md, nil
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
outRdr := bytes.NewReader(g.stdout.Bytes())
|
||||
|
|
Loading…
Reference in a new issue