Commit graph

9 commits

Author SHA1 Message Date
Koni Marti
8813fadfe9 pgp: update openpgp packages (go-crypto and go-pgpmail)
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>
2022-01-07 13:45:34 +01:00
Robin Jarry
0d645bcebd go.mod: change base git url
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-11-05 10:21:45 +01:00
Robin Jarry
074b0a1bd8 view,list: fix crash when viewing incomplete imap messages
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>
2021-10-28 16:38:23 +02:00
ARaspiK
0535f6333f Add additional flagging functionality
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-07-08 09:13:03 +02:00
Ray Ganardi
58db517c8d pgp: fail gracefully from email decryption
Aerc panics when there's an error on email decryption.
Instead, an error message should be shown.
2020-05-25 09:30:20 -04:00
Reto Brunner
13a6a3fa71 FetchBodyPart doesn't need the parent body structure 2020-05-17 11:44:38 +02:00
Reto Brunner
b03a73726d lib/messageview: mark messages as read
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-06 10:00:46 -04:00
Ben Fiedler
05fa79eb8e store.FetchFull: Change callback type to expose entire message
This is a prerequisite for allowing the FetchFull message to return both
the message content and the message headers.
2020-05-01 11:10:08 -04:00
Drew DeVault
f3158b36f1 Initial support for PGP decryption & signatures 2020-03-03 16:49:52 -05:00