1. 13 Mar, 2019 2 commits
    • Kevin J. McCarthy's avatar
    • Kevin J. McCarthy's avatar
      Fix incorrect IMAP message purging bug. · fedb91e2
      Kevin J. McCarthy authored
      Thanks to Ivan Middleton @imiddle for the awesome bug report and
      suggested fix.
      The bug is most easily generated using Gmail with the $trash variable
      Deleted messages are first copied to the $trash folder.  If this is
      set to "[Gmail]/Trash", then Gmail inteprets the copy as a "delete"
      and sends EXPUNGE messages back for the messages.
      cmd_parse_expunge() and cmd_parse_vanished() set the hdr->index to
      INT_MAX, which subsequently an imap_expunge_mailbox() will use to
      remove the messages from the local mailbox.
      If we close the mailbox instead of sync it, Mutt will end up executing
      the 'Deleted' flag setting before processing the expunge (because
      "imap_check_mailbox() -> imap_cmd_finish()' doesn't set check_status
      when we are closing).  The expunged messages will then be included in
      the set of 'Deleted' flags.
      Unfortunately, because the messages are sorted by *index* before
      msgset generation, an incorrect range of UIDs will be sent, which
      could easily include messages that should not be deleted.
      This fix is a minimal fix for a stable bug fix  excluding
      messages with the index set to INT_MAX from all msg sets.  Other
      things that should be investigated in master are:
      - sorting by UID instead of index before msgset generation
      - unsetting the 'active' flag in cmd_parse_expunge() and
        cmd_parse_vanished() instead of waiting until imap_expunge_mailbox()
        to do so.
  2. 01 Feb, 2019 2 commits
  3. 25 Jan, 2019 1 commit
    • Kevin J. McCarthy's avatar
      Show top-level decoded smime text/plain parts. · 1041fb4f
      Kevin J. McCarthy authored
      Commit 331d9d5a attempted to fix a problem with an attachment having
      extension .p7m.  The attachment menu tried to decode and failed, and
      the part ended up being replaced by a bogus text/plain part.
      The problem is that crypt_smime_decrypt_mime() returns a text/plain
      part if the decode fails, meaning we can't distinguish failure from
      success in this case.
      As a compromise, only use a text/plain resulting from a single
      top-level application_smime part.  This will allow for the case of an
      text/plain encoded email, but won't end up hiding attachments that
      were not decoded.
  4. 24 Jan, 2019 1 commit
    • Kevin J. McCarthy's avatar
      Improve attachment menu for s/mime parts. (closes #113) · 331d9d5a
      Kevin J. McCarthy authored
      Don't prompt for passphrase or getkeys, or set the ENCRYPT flag, for
      OPAQUE types.
      Don't recurse on "text" output from decrypt_mime().  There is no
      reason to recurse on a text type.  Additionally, the
      mutt_read_mime_header() will return an empty text type even if the
      decode doesn't generate mime output.  In those cases, we want to show
      the original attachment.
  5. 22 Jan, 2019 1 commit
  6. 21 Jan, 2019 3 commits
    • Kevin J. McCarthy's avatar
      Fix raw socket read/write to follow expected behavior. · 688e27a9
      Kevin J. McCarthy authored
      The mutt_sasl.c code expects conn_write() to write the entire buffer.
      This is inconsistent with mutt_socket.c, but since other conn_write()
      implementations guarantee this, change raw_socket_write() to do so too
      for now.
      Also, update reading and writing to loop on EINTR, as gnutls does.
      They won't return EAGAIN or EWOULDBLOCK because we don't mark sockets
      as non-blocking.
    • Kevin J. McCarthy's avatar
      Convert to use gitlab registry image ubuntu:18.04. · ae8bb261
      Kevin J. McCarthy authored
      The gitlab registry image is built using the Dockerfile in
      Turn off the scan-build-5.0.  I never look at those reports and they
      run very slowly.
      Also, for now just compile for gnutls, to speed up the check further.
      (cherry picked from commit f34cb1fb)
    • Kevin J. McCarthy's avatar
      Fix gnutls tls_socket_write() to properly retry. · 73b3151e
      Kevin J. McCarthy authored
      Retry on GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED.  This prevents an
      aborted send due to a SIGWINCH, for instance.
      Change tls_socket_read() to follow the same flow.  Don't bother
      checking gnutls_error_is_fatal() because return codes besides AGAIN
      and INTERRUPTED end up closing the connection regardless.  (We don't
      handle handshakes and negotations during send/receive).
  7. 19 Jan, 2019 2 commits
  8. 10 Jan, 2019 1 commit
  9. 08 Jan, 2019 3 commits
  10. 05 Jan, 2019 1 commit
  11. 04 Jan, 2019 1 commit
    • Kevin J. McCarthy's avatar
      Fix mkdtemp.c implementation. · 853e48bf
      Kevin J. McCarthy authored
      Two statements were indented on the same line under a for statement.
      The second one would not be included in the loop, only being executed
      after the loop finishes.
      This is obviously an error, as it modifies the LETTERS entry being
  12. 28 Dec, 2018 3 commits
  13. 27 Dec, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Handle improperly encoded pgp/mime octetstream part. · eb444e63
      Kevin J. McCarthy authored
      Some clients (or even mail servers) improperly encode the octetstream
      Thanks to Riccardo Schirone for the original merge request patch.
      This commit also handles the attachment menu, and makes the decoding
      conditional so it's not done if it isn't necessary.
      (cherry picked from commit 450de463)
  14. 21 Dec, 2018 2 commits
  15. 13 Dec, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Fix imap_sync_mailbox() hcache leak. · 101e05d6
      Kevin J. McCarthy authored
      Uploading changed messages to the server ends up overwriting the
      hcache.  Add a straightforward fix and a longish explanation comment
      for the stable branch fix.
      Add a TODO noting a better fix should be done in the master branch in
      the future.
  16. 12 Dec, 2018 3 commits
  17. 07 Dec, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Fix classic gpg date parsing in list-keys. · 59625f54
      Kevin J. McCarthy authored
      GnuPG changed the format of their --with-colons output in 2.0.10.
      Dates are now seconds since epoch.  Update the parse_pub_line() code
      to detect the new format.
      The GnuPG changes also separated pub and the first uid.  Since mutt
      allows an empty uid field, the output is a bit less friendly now, with
      an initial key without an uid.  I think that's acceptable, but
      eventually we'll want to change the parsing behavior.
  18. 03 Dec, 2018 1 commit
  19. 01 Dec, 2018 2 commits
  20. 30 Nov, 2018 2 commits
  21. 27 Nov, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Fix QRESYNC crash after a large number of VANISHED messages. · 41816374
      Kevin J. McCarthy authored
      When handling QRESYNC vanished, imap_expunge_mailbox() was called to
      empty out the messages.  Various counters, including vcount are
      updated by the mx_update_tables() after the expunge.
      These counters need to be reset, because mx_update_context() will do
      so once again at the end of reading new headers.  This can cause an
      out of bounds access in v2r.
  22. 25 Nov, 2018 2 commits
  23. 24 Nov, 2018 3 commits