summaryrefslogtreecommitdiff
path: root/lib/messageview.go
AgeCommit message (Collapse)Author
2022-04-27refactor: refactor pgp implementationTim Culverhouse
This commit refactors the internal PGP implementation to make way for GPG integration. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
2022-04-25pgp: ensure CRLF line endings in pgpmail readerKoni Marti
Ensure CRLF line endings in the pgpmail reader. Fix the pgp signature verification for maildir and notmuch. These backends do not return the full message body with CRLF line endings. But the accepted OpenPGP convention is for signed data to end with a <CR><LF> sequence (see RFC3156). If this is not the case the signed and transmitted data are considered not the same and thus signature verification fails. Link: https://datatracker.ietf.org/doc/html/rfc3156 Reported-by: Tim Culverhouse <tim@timculverhouse.com> Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
2022-01-07pgp: update openpgp packages (go-crypto and go-pgpmail)Koni Marti
Replaces golang.org/x/crypto with github.com/ProtonMail/go-crypto consistently and updates go-pgpmail to v0.2.0 Signed-off-by: Koni Marti <koni.marti@gmail.com>
2021-11-05go.mod: change base git urlRobin Jarry
I'm not sure what are the implications but it seems required. Link: https://github.com/golang/go/issues/20883 Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-10-28view,list: fix crash when viewing incomplete imap messagesRobin Jarry
With IMAP, due to an unidentified reason, some messages to not have any body accessible. When viewing them, aerc crashes: git.sr.ht/~sircmpwn/aerc/lib.usePGP lib/messageview.go:37 git.sr.ht/~sircmpwn/aerc/lib.NewMessageStoreView lib/messageview.go:67 git.sr.ht/~sircmpwn/aerc/commands/account.ViewMessage.Execute commands/account/view.go:45 git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand commands/commands.go:66 main.execCommand aerc.go:61 main.main.func2 aerc.go:160 aerc crashed: runtime error: invalid memory address or nil pointer dereference Check the pointer before dereferencing. Also, add a global check in ParseMessageFormat where a similar issue may occur. Signed-off-by: Robin Jarry <robin@jarry.cc>
2020-07-08Add additional flagging functionalityARaspiK
More mail flags can now be set, unset, and toggled, not just the read/seen flag. This functionality is implemented with a new `:flag` and `:unflag` command, which are extensions to the matching `:read` and `:unread` commands, adding support for different flags. In fact, the `read`/`unread` commands are now recognized aliases to `flag`/`unflag`. The new commands are also well documented in aerc(1). The change mostly extends the previous read/unread setting functionality by adding a selection for the flag to change.
2020-05-25pgp: fail gracefully from email decryptionRay Ganardi
Aerc panics when there's an error on email decryption. Instead, an error message should be shown.
2020-05-17FetchBodyPart doesn't need the parent body structureReto Brunner
2020-05-06lib/messageview: mark messages as readReto Brunner
Currently at least the notmuch and maildir worker only set messages as read if a body part is fetched. The gpg abstraction however fetches the full message. We can simply set the readstate when we create the messageview, avoiding the issue. Once this is merged, we can cleanup both workers.
2020-05-01store.FetchFull: Change callback type to expose entire messageBen Fiedler
This is a prerequisite for allowing the FetchFull message to return both the message content and the message headers.
2020-03-03Initial support for PGP decryption & signaturesDrew DeVault