1. 11 Jun, 2022 2 commits
  2. 05 Jun, 2022 3 commits
  3. 28 May, 2022 1 commit
  4. 27 May, 2022 7 commits
    • Kevin J. McCarthy's avatar
      Fix $pgp_sort_keys sorting. · 44636260
      Kevin J. McCarthy authored
      Both gpgme and pgpkey used nonsensical comparison return values, for
      example: "return r > 0".
      
      Adjust numeric comparisons to use mutt_numeric_cmp() and have the
      comparator return the result of the actual comparison.
      
      Adjust the "trust" sorting of gpgme to be the same as classic-pgp:
      putting restrictions at the bottom, but reverse sorting validity,
      length and timestamp values so they come first in the list.
      44636260
    • Kevin J. McCarthy's avatar
      Adjust browser and sidebar numeric sorting to use mutt_numeric_cmp() · 818ea32c
      Kevin J. McCarthy authored
      Large values shouldn't use subtraction into an integer return type, so
      just convert all of them to use the macro, to be safe.
      818ea32c
    • Kevin J. McCarthy's avatar
      Merge branch 'stable' · 0a36fe5f
      Kevin J. McCarthy authored
      0a36fe5f
    • Kevin J. McCarthy's avatar
      Fix mbrtowc() error handling in mutt_which_case(). · f8336984
      Kevin J. McCarthy authored
      The function did not reset the increment value on a -2 return value.
      
      Increase the maximum conversion size to the string length, and check
      for -2.  Since we're looking at the whole string, we can then just
      terminate the loop on either value, assuming a case-sensitive search.
      
      mbrtowc() will return -2 if passed n==0, so add an explicit check for
      the end of string and a positive n count.
      f8336984
    • Kevin J. McCarthy's avatar
      Fix mbrtowc() error handling in check_alias_name(). · def28317
      Kevin J. McCarthy authored
      The function did not reset the increment value on any error.  Increase
      the maximum conversion size to the string length, and check for -2.
      Since we're looking at the whole string, we can then just terminate
      the loop on a -2 return value.
      def28317
    • Kevin J. McCarthy's avatar
      Convert my_width() to use mbrtowc(). · 51c67ba9
      Kevin J. McCarthy authored
      This allows handling a single corrupted character vs an incomplete
      multibyte character differently, as other parts of Mutt do.
      51c67ba9
    • Kevin J. McCarthy's avatar
      Fix header folding my_width() calculation. · ca960228
      Kevin J. McCarthy authored
      After calculating the width of a character, the routine would only
      increment the string pointer by one byte.  Any errors returned by
      mbtowc() would also increment the width by one.  This means multibyte
      characters would overcount width by the number of bytes minus one.
      
      Change it to check the return value and use that value to increment
      the string pointer.
      
      Change mbtowc() to look at the whole rest of the string instead of
      just MB_CUR_MAX, as the manpage says even MB_CUR_MAX may not be enough
      in some circumstances.
      
      Since we calculate strlen, use that as well as '\0' for the loop
      termination check.  Also check for mbtowc() returning 0 just for extra
      safety.
      
      Reset the internal mbstate_t before converting, and on any error.
      
      If mbtowc() returns an error, use replacment_char() as a substitue for
      width calcluation, as mutt_strwidth() and other parts of Mutt do.
      ca960228
  5. 25 May, 2022 2 commits
    • Kevin J. McCarthy's avatar
      Merge branch 'stable' · e1058b2a
      Kevin J. McCarthy authored
      e1058b2a
    • Kevin J. McCarthy's avatar
      Filter Arabic Letter Mark due to display corruption. · 67bb3d35
      Kevin J. McCarthy authored
      Under GNU Screen, the directional marker causes display corruption in
      the index.
      
      This (along with past filters added) should perhaps be considered GNU
      Screen bugs.  They've been reported upstream a while ago, but so far
      not received any attention.  So for Mutt users' benefit it's better to
      filter them out for now.
      
      Thanks to Vincent Lefèvre for debugging and reporting the problem,
      along with providing historical information from similar past issues.
      67bb3d35
  6. 21 May, 2022 3 commits
    • Kevin J. McCarthy's avatar
      Merge branch 'stable' · 1066be97
      Kevin J. McCarthy authored
      1066be97
    • Kevin J. McCarthy's avatar
      Fix browser completion path expansion to preserve a trailing slash. · ceb6c4fc
      Kevin J. McCarthy authored
      The browser lists the contents of a directory passed as 'f' when it
      has a trailing slash; without, it lists everything matching that name
      in the parent directory.
      
      Since the browser does its own relative path expansion, we can just
      use mutt_buffer_path_norel() to keep a trailing slash in 'f'.
      ceb6c4fc
    • Kevin J. McCarthy's avatar
      Decouple expand_path() relpath vs trailing slash handling. · 599806a0
      Kevin J. McCarthy authored
      This change was originally done for the next commit, to fix browser
      completion handling.  However, I discovered the browser does its own
      relative path expansion, and could just be fixed by using the _norel()
      version.
      
      Still, I think this change is a good idea in any case.  There may be a
      few more fixes needed that require relpath expansion while keeping
      trailing slashes.
      
      Since the number of flag parameters to expand_path would become
      excessive by adding a "remove_trailing_slash" paremeter, convert it to
      use a single 'flags' parameter instead.
      599806a0
  7. 20 May, 2022 2 commits
  8. 19 May, 2022 2 commits
    • Kevin J. McCarthy's avatar
      Merge branch 'stable' · caf1d53e
      Kevin J. McCarthy authored
      caf1d53e
    • Kevin J. McCarthy's avatar
      Document $sendmail invocation behavior. · 80d90e0c
      Kevin J. McCarthy authored
      This variable is handled differently from other "command" variables in
      Mutt.  It's tokenized by space and then executed via execvp().  This
      means spaces in command/arguments are not supported, and neither is
      shell quoting.
      
      I don't know if it was done this way out of some security concern, but
      it seems like using mutt_system() and mutt_buffer_quote_filename() for
      recipient arguments should at least be investigated.
      80d90e0c
  9. 16 May, 2022 3 commits
  10. 14 May, 2022 2 commits
    • Kevin J. McCarthy's avatar
      Merge branch 'stable' · 5cc97c19
      Kevin J. McCarthy authored
      5cc97c19
    • Kevin J. McCarthy's avatar
      Set gsasl hostname callback value. · 6688bfbf
      Kevin J. McCarthy authored
      This is needed for GSSAPI, and apparently DIGEST-MD5 too.
      
      The gsasl documentation is a little confusing, saying it "should be
      the local host name of the machine", however the imap/auth_gss.c code
      seems to be using the server name, and the msmtp source also uses the
      server name for this callback.
      
      Thanks to brian m. carlson and Gábor Gombás for reporting this issue
      in Debian ticket 1010915, and an additional thanks to brian for
      quickly testing the fix.
      6688bfbf
  11. 08 May, 2022 2 commits
  12. 30 Apr, 2022 5 commits
    • Kevin J. McCarthy's avatar
      Merge branch 'stable' · 448b2574
      Kevin J. McCarthy authored
      448b2574
    • Kevin J. McCarthy's avatar
      c3baa83e
    • Kevin J. McCarthy's avatar
      4d082513
    • Kevin J. McCarthy's avatar
      Document $header_cache behavior change wrt directories. · 7dec694f
      Kevin J. McCarthy authored
      Although not documented, Mutt would previously intepret a
      $header_cache value ending in '/' as a directory even if it didn't
      exist.  The new DT_PATH normalization prevents this possibility, so a
      directory will need to be created in advance.
      
      I'm not fond of "fixing" regressions with documentation, but I believe
      this is a small issue, easily worked around for first-time use, and
      the benefits of the normalization are worth this small change.
      7dec694f
    • Kevin J. McCarthy's avatar
      When expanding local paths, normalize to remove a trailing '/'. · a20ed9b4
      Kevin J. McCarthy authored
      Commit 986e9e74 normalized Maildir/mh paths upon opening, to aid in
      mailbox comparison issues that can crop up (as the IMAP path
      normalization does).
      
      Unfortunately, this caused other problems in cases where users were
      explicitly adding a trailing '/' to their config settings, such as
      with buffy mailboxes, or with $spoolfile.
      
      To normalize properly, we need to do as the IMAP code does - both on
      the context opening, and expand_path (as imap_expand_path() and
      imap_fix_path() do).
      
      This also helps other cases; for example, the file browser returns
      entries without a trailing '/', while tab completion in the editor
      menu appends a trailing '/'.
      
      Right now the only regression I'm aware of is with $header_cache on
      first use, which I will document in the next commit.  If it turns out
      there are more important regressions I may have to back this and the
      original commit out.
      a20ed9b4
  13. 21 Apr, 2022 2 commits
  14. 12 Apr, 2022 4 commits