1. 31 Jan, 2018 2 commits
  2. 27 Jan, 2018 1 commit
  3. 22 Jan, 2018 1 commit
  4. 18 Jan, 2018 6 commits
  5. 11 Jan, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Add missing setup calls when resuming encrypted drafts. · 667a4710
      Kevin J. McCarthy authored
      Calls to get the passphrase were missing for app/pgp and app/smime.
      App/smime was also missing a call to crypt_smime_getkeys().
      
      If a failure occurs, report it back, rather than just continuing.
      Otherwise, postponed messages could be completely lost.
      667a4710
  6. 07 Jan, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Fix imap status count range check. · a37a2c4d
      Kevin J. McCarthy authored
      The strtoul() call for parsing the STATUS count wasn't checking the
      range properly, because it was assigning to an unsigned int.
      
      Change to assign to a unsigned long, and also add the conversion check
      from mutt_atoui().
      
      Thanks to Charles (@chdiza) for quickly noticing the problem!
      a37a2c4d
  7. 06 Jan, 2018 2 commits
    • Kevin J. McCarthy's avatar
      Change imap literal counts to parse and store unsigned ints. · 8fcf8eda
      Kevin J. McCarthy authored
      IMAP literals are of type number.  Change imap_get_literal_count() to
      use mutt_atoui() instead of atoi().  Change the return type variables
      used to store the count to type unsigned int.
      
      It's doubtful this was a real issue, but as long as we're cleaning up
      incorrect atoi() usage, we should fix this too.
      8fcf8eda
    • Kevin J. McCarthy's avatar
      Fix improper signed int conversion of IMAP uid and msn values. · b8190ef3
      Kevin J. McCarthy authored
      Several places in the imap code, when parsing "number" and "nz-number"
      values from the IMAP data, use atoi() and strtol().  This is
      incorrect, and can result in failures when a uid value happens to be
      larger than 2^31.
      
      Create a helper function, mutt_atoui() and use that instead.  One
      place was using strtol() and relying on the endptr parameter, and so
      was changed to use strtoul() instead.
      
      Thanks to Paul Saunders for the bug report and original patch, which
      this commit is based on.
      b8190ef3
  8. 26 Dec, 2017 1 commit
  9. 18 Dec, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Determine latest tag using git describe. · 80d06b0c
      Kevin J. McCarthy authored
      Commit 8648db83 relies on `sort -V` which is unavailable on some
      platforms.  Instead just use `git describe` with --abbrev=0 to only
      output the tag.  We still manually compute the distance to avoid the
      problem mentioned in that commit.
      
      Additionally, add Vincent's fix from commit 3b142cea to the stable
      branch.
      80d06b0c
  10. 15 Dec, 2017 3 commits
    • Kevin J. McCarthy's avatar
      8e0d8616
    • Kevin J. McCarthy's avatar
      Fix s/mime certificate deletion bug. (closes #3982) · 9eedfd4e
      Kevin J. McCarthy authored
      Commit c1bcf4ba exposed a bug in the s/mime encryption code.  It was
      errorneously calling unlink on the list of generated cert files to
      use.
      
      Prior to that commit, the list had an initial space, which apparently
      made the unlink fail.  After that commit, encrypting to a single
      certificate would end up deleting the certificate.
      
      Remove the calls to unlink the cert file.  Add some missing cleanup if
      the call to openssl fails.
      9eedfd4e
    • Kevin J. McCarthy's avatar
      Update mkchangelog.sh to use git. · 841f7101
      Kevin J. McCarthy authored
      The output isn't quite as nice as the hg generated version, but is
      close.
      
      With Mercurial, and now Git, I'm not sure of the usefulness of
      maintaining a ChangeLog file in the repos, but that is another
      discussion.
      841f7101
  11. 13 Dec, 2017 3 commits
  12. 11 Dec, 2017 1 commit
  13. 04 Dec, 2017 1 commit
  14. 03 Dec, 2017 1 commit
  15. 01 Oct, 2017 1 commit
  16. 27 Sep, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Fix uses of context->changed as a counter. · 0bcb77a6
      Kevin J. McCarthy authored
      The first was in mx_update_tables(), but only when "not committing".
      This is used by mh/maildir during an "occult" update, and in imap when
      expunging the mailbox.  It meant to simply turn on changed when a
      single changed header is seen.
      
      The second use was in imap_sync_message_for_copy().  Previously this
      was used for a server side copy/save, but is now also used for
      fast-trash copying.  Remove the code that was trying to decrement the
      counter: this function is not capable of properly setting a status
      bit.
      0bcb77a6
  17. 23 Sep, 2017 3 commits
  18. 22 Sep, 2017 3 commits
    • Kevin J. McCarthy's avatar
      Add missing IMAP_CMD_POLL flag in imap buffy check. · 4c961065
      Kevin J. McCarthy authored
      I missed adding the flag to one of the imap_exec() calls inside the
      loop, when a different server is encountered in the mailboxes list.
      4c961065
    • Kevin J. McCarthy's avatar
      Close the imap socket for the selected mailbox on error. · 1eab7774
      Kevin J. McCarthy authored
      The new $imap_poll_timeout calls the cmd_handle_fatal() error handler
      on timeout, which is supposed to close and cleanup.
      
      However, for the currently selected mailbox, the error handler was not
      closing the socket after closing up the mailbox.  This left extra
      SSL/GnuTLS data around and was causing errors on an attempt to
      reconnect.
      
      Thanks to Fabian Groffen for reporting the issue.
      1eab7774
    • Kevin J. McCarthy's avatar
      Fix imap sync segfault due to inactive headers during an expunge. (closes #3971) · a4dbae76
      Kevin J. McCarthy authored
      Mutt has several places where it turns off h->active as a hack.  For
      example to avoid FLAG updates, or to exclude from imap_exec_msgset.
      
      Unfortunately, when a reopen is allowed and the IMAP_EXPUNGE_PENDING
      flag becomes set (e.g. a flag update to a modified header),
      imap_expunge_mailbox() will be called by imap_cmd_finish().
      
      The mx_update_tables() would free and remove these "inactive" headers,
      despite that an EXPUNGE was not received for them.  This would result
      in memory leaks and segfaults due to dangling pointers in the
      msn_index and uid_hash.
      
      There should probably be a more elegant solution, removing the initial
      hacks.  However, this is causing a segfault, and the best solution
      right now is to turn active back on for non-expunged messages in
      imap_expunge_mailbox().
      
      Extra thanks to chdiza, who bravely runs tip and found this issue
      quickly.
      a4dbae76
  19. 14 Sep, 2017 1 commit
  20. 13 Sep, 2017 2 commits
    • Kevin J. McCarthy's avatar
      Change imap copy/save and trash to sync flags, excluding deleted. (closes #3966) (closes #3860) · 19a17aae
      Kevin J. McCarthy authored
      imap_copy_messages() uses a helper to sync the flags before performing
      a server-side copy.  However, it had a bug that the "deleted" flag on
      a local message, if set, will be propagated to the copy too.
      
      Change the copy sync helper to ignore the deleted flag.  Then, change
      the imap trash function to use the same helper.
      
      Thanks to Anton Lindqvist for his excellent bug report, suggested
      fixes, and help testing.
      19a17aae
    • Kevin J. McCarthy's avatar
      Remove \Seen flag setting for imap trash. (see #3966) (see #3860) · 0139a67d
      Kevin J. McCarthy authored
      Commit 323e3d6e5e4c has a side effect where spurious FETCH flag
      updates after setting the \Seen flag can cause a sync to abort.
      
      Remove manually setting \Seen for all trashed message before copying.
      
      The next commit will change the imap trash function to use the same
      code as the imap copy/save function for syncing the message before
      server-side copying.
      0139a67d
  21. 04 Sep, 2017 2 commits
  22. 02 Sep, 2017 2 commits