aboutsummaryrefslogtreecommitdiffstats
path: root/lib/messageview.go
Commit message (Collapse)AuthorAgeFilesLines
* pgp: ensure CRLF line endings in pgpmail readerKoni Marti2022-04-251-1/+1
| | | | | | | | | | | | | | | | | | 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>
* pgp: update openpgp packages (go-crypto and go-pgpmail)Koni Marti2022-01-071-1/+1
| | | | | | | 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>
* go.mod: change base git urlRobin Jarry2021-11-051-3/+3
| | | | | | | 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>
* view,list: fix crash when viewing incomplete imap messagesRobin Jarry2021-10-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add additional flagging functionalityARaspiK2020-07-081-1/+1
| | | | | | | | | | | | | | 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.
* pgp: fail gracefully from email decryptionRay Ganardi2020-05-251-7/+11
| | | | | Aerc panics when there's an error on email decryption. Instead, an error message should be shown.
* FetchBodyPart doesn't need the parent body structureReto Brunner2020-05-171-5/+3
|
* lib/messageview: mark messages as readReto Brunner2020-05-061-0/+1
| | | | | | | | | 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.
* store.FetchFull: Change callback type to expose entire messageBen Fiedler2020-05-011-1/+3
| | | | | This is a prerequisite for allowing the FetchFull message to return both the message content and the message headers.
* Initial support for PGP decryption & signaturesDrew DeVault2020-03-031-0/+128