summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Merge branch 'stable'masterKevin McCarthy2023-09-09-5/+97
|\
| * automatic post-release commit for mutt-2.2.12Kevin McCarthy2023-09-09-1/+89
| |
| * Update UPDATING file for 2.2.12 release.Kevin McCarthy2023-09-09-0/+4
| |
| * Fix write_one_header() illegal header check.Kevin McCarthy2023-09-09-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is another crash caused by the rfc2047 decoding bug fixed in the second prior commit. In this case, an empty header line followed by a header line starting with ":", would result in t==end. The mutt_substrdup() further below would go very badly at that point, with t >= end+1. This could result in either a memcpy onto NULL or a huge malloc call. Thanks to Chenyuan Mi (@morningbread) for giving a working example draft message of the rfc2047 decoding flaw. This allowed me, with further testing, to discover this additional crash bug.
| * Check for NULL userhdrs.Kevin McCarthy2023-09-09-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When composing an email, miscellaneous extra headers are stored in a userhdrs list. Mutt first checks to ensure each header contains at least a colon character, passes the entire userhdr field (name, colon, and body) to the rfc2047 decoder, and safe_strdup()'s the result on the userhdrs list. An empty result would from the decode would result in a NULL headers being added to list. The previous commit removed the possibility of the decoded header field being empty, but it's prudent to add a check to the strchr calls, in case there is another unexpected bug resulting in one. Thanks to Chenyuan Mi (@morningbread) for discovering the two strchr crashes, giving a working example draft message, and providing the stack traces for the two NULL derefences.
| * Fix rfc2047 base64 decoding to abort on illegal characters.Kevin McCarthy2023-09-09-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason, the rfc2047 base64 decoder ignored illegal characters, instead of aborting. This seems innocuous, but in fact leads to at least three crash-bugs elsewhere in Mutt. These stem from Mutt, in some cases, passing an entire header field (name, colon, and body) to the rfc2047 decoder. (It is technically incorrect to do so, by the way, but is beyond scope for these fixes in stable). Mutt then assumes the result can't be empty because of a previous check that the header contains at least a colon. This commit takes care of the source of the crashes, by aborting the rfc2047 decode. The following two commits add protective fixes to the specific crash points. Thanks to Chenyuan Mi (@morningbread) for discovering the strchr crashes, giving a working example draft message, and providing the stack traces for the two NULL derefences.
* | Merge branch 'stable'Kevin McCarthy2023-08-23-0/+6
|\|
| * Add a documentation note that aliases are case insensitive.Kevin McCarthy2023-08-23-0/+6
| | | | | | | | | | | | It's very old behavior, but doesn't seem to be documented anywhere. Thanks to Charles for pointing that out.
* | Merge branch 'stable'Kevin McCarthy2023-08-18-1/+68
|\|
| * automatic post-release commit for mutt-2.2.11Kevin McCarthy2023-08-18-1/+64
| |
| * Update UPDATING file for 2.2.11 release.Kevin McCarthy2023-08-18-0/+4
| |
* | Merge branch 'stable'Kevin McCarthy2023-08-15-1/+1
|\|
| * Fix GPGME build failure on MacOS.Kevin McCarthy2023-08-15-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 012981e8 (in release 2.2.9) updated the GPGME autoconf files, to fix a build issue with newer GPGME releases. Unfortunatley that caused a build issue for hosts where the gpg-error header files aren't in the include path. The newer autoconf file expect GPG_ERROR_CFLAGS to be added to the list of flags for the compiler. Thanks to Will Yardley for reporting the issue and quickly testing the proposed fix.
* | Update smime_keys.pl Aram Hamo2023-07-18-1/+1
| | | | | | accepting old/insecure smime certificates
* | Merge branch 'stable'Kevin McCarthy2023-06-05-723/+642
|\|
| * Updated Japanese translation.TAKAHASHI Tamotsu2023-06-05-723/+642
| |
* | Merge branch 'stable'Kevin McCarthy2023-04-15-9/+21
|\|
| * Fix <collapse-all> behavior for sort=reverse-threads.Kevin McCarthy2023-04-14-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When uncollapsing, _mutt_traverse_thread() returns the virtual number of the root message in the thread. <collapse-thread> directly sets menu->current to this value to cause the cursor to be on the *first* message of the thread (which isn't the same as the root message when sort=reverse-threads). <collapse-all> finds the corresponding message by searching for it after re-indexing. However, when collapsing, _mutt_traverse_thread() had code to try and find the *first* message in the thread and return that virtual number. <collapse-thread> then did the same trick, because the old first message is now the new root message for sort=reverse-threads. However, that cleverness caused a bug for <collapse-all> - it can't use that virtual number directly, and it can't "find" the message at the index after reindexing. To fix this, remove the cleverness from _mutt_traverse_thread() when collapsing. Return the virtual number of the root. Add searching behavior for <collapse-thread> to fix its behavior.
* | Merge branch 'stable'Kevin McCarthy2023-03-25-1/+227
|\|
| * automatic post-release commit for mutt-2.2.10Kevin McCarthy2023-03-25-1/+221
| |
| * Update UPDATING files for 2.2.10 release.Kevin McCarthy2023-03-25-0/+6
| |
* | Merge branch 'stable'Kevin McCarthy2023-03-13-67/+67
|\|
| * Update copyright notices.Kevin McCarthy2023-03-13-67/+67
| | | | | | | | | | This is generated from the copyright-updater script, with manual updates for the main.c and documentation, and po files.
* | Merge branch 'stable'Kevin McCarthy2023-03-12-0/+19
|\|
| * Abort imap_fast_trash() if previously checkpointed.Kevin McCarthy2023-03-12-0/+19
| | | | | | | | | | | | | | | | | | | | | | We don't want to copy the deleted flag over to the trash folder too. I looked into various ways to keep the UID COPY, but they lead to niggling issues with error handling along with handling if the server sends flag updates back to the client. So for that (hopefully rare) case, abort the fast trash and just use a regular copy.
* | Merge branch 'stable'Kevin McCarthy2023-03-12-6/+31
|\|
| * Improve smtp oauth authentication.Kevin McCarthy2023-03-12-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split XOAUTH2 to use two steps. This follows the microsoft.com documentation example for smtp. Since office365 is the main site using XOAUTH2 now, it's better to match their documentation. It also matches msmtp's behavior, which probably means somewhere or another needs it that way. At the same time, improve response code checking. Mutt was using smtp_get_resp() before, which returns 0 for both a ready and success response code. Make sure it's a success response code when done authenticating.
* | Merge branch 'stable'Kevin McCarthy2023-03-06-14/+38
|\|
| * Use base64 URL safe alphabet for message id generation.Sebastian Andrzej Siewior2023-03-04-12/+36
| | | | | | | | | | | | | | | | | | | | | | The character '/' from base64 alphabet breaks web redirectors if the message-id from an email is used as part of the URL for redirectors and/ or automatic pointers to an email. Use the URL safe alphabet from RFC4648 section 5 for message id generation. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
| * base64val: Add support to decode base64 safe URL.Sebastian Andrzej Siewior2023-03-04-2/+2
| | | | | | | | | | | | | | | | In the base64 safe URL dictionary the characters '+' and '/' are replaced by '-' and '_'. Add the characters to Index_64 to allow decoding if needed. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
* | Merge branch 'stable'Kevin McCarthy2022-12-20-0/+1
|\|
| * mutt_oauth2: Print access token request messageCline, Wade2022-12-20-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | There are cases when using the 'authcode' grant where the authorization request will succeed but the access token request will fail (for example: if the user's web browser and terminal use different proxy settings). The current implementation of the script does not inform the user that the authorization token is being exchanged for an access code, with the result that it can appear that a request has both succeeded (according to the browser) and failed (according to the terminal output) simultaneously. Add a message to inform the user that a second request is being made so there is less potential for confusion.
* | Merge branch 'stable'Kevin McCarthy2022-12-12-20/+31
|\|
| * Move MuttLisp boolean config note.Kevin McCarthy2022-12-12-19/+19
| | | | | | | | | | I think it probably makes more sense to be inside the (if) function documentation than (equal).
| * Fix counters for external maildir 'T' flag changes.Kevin McCarthy2022-12-12-1/+12
| | | | | | | | | | | | | | | | The maildir_check_mailbox() code was not updating the context deleted and trashed counts in those cases. This could lead to messages marked as deleted, but no action being taken on a mailbox sync/close. wip: fix ctx counts for maildir 'T' flags updates.
* | Merge branch 'stable'Kevin McCarthy2022-12-07-3/+19
|\|
| * Remove reference to $mark_old inside $mail_check_recent.Kevin McCarthy2022-12-07-3/+0
| | | | | | | | | | | | | | | | | | There doesn't appear to be any relationship between $mark_old and "new mail" status any more. Commit c26c2531 (from 2002) is the most recent commit that talked about reducing the meaning of $mark_old, and may have been the commit to make that separation.
| * Add doc note to MuttLisp about boolean config vars.Kevin McCarthy2022-12-07-0/+19
| | | | | | | | | | They evaluate to "yes" and "no", and so need an explicit comparison to those values when using the equal function.
* | mutt_ssl: refactor Implicit TLS and STARTTLS codeMatthias Andree2022-12-03-149/+85
| | | | | | | | Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
* | Change the initial browser file to to cwd.Kevin McCarthy2022-12-03-1/+6
| | | | | | | | | | If the working_dir was empty, it would be set to $folder, which isn't helpful if it's a IMAP directory. Instead set it to cwd.
* | Divide browser "LastDir" into separate file and mailbox locations.Kevin McCarthy2022-12-03-107/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously there was only one "last" location stored, shared between file and mailbox operations when the MUTT_SEL_FOLDER flags was passed. This meant adding attachments to a composed message would start in the "mailbox" place (which could be an IMAP folder). Then, a subsequent change-folder would start in the attachment directory browsed to. Create two different flags, MUTT_SEL_MAILBOX and MUTT_SEL_FILE and use those to use the corresponding "last" variable. Change the browser function to use a temporary buffer, working_dir, instead of directly manipulating LastDir. Change callers to use the appropriate flag based on their usage.
* | Add socket send/receive timeout optionsMatthew Sotoudeh2022-12-03-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | On an unreliable connection (e.g., laptop put to sleep and changing wifi networks) I've had mutt fairly regularly become stuck in SSL_read and have to be killed. Per some of the comments on https://stackoverflow.com/questions/46517875/ssl-read-blocks-indefinitely adding a timeout to the socket should carry over to the SSL_read call. Using this socket_receive_timeout option appears to resolve the issue for me.
* | Merge branch 'stable'Kevin McCarthy2022-11-21-18/+8
|\|
| * Reset header color after mutt_set_flag().Kevin McCarthy2022-11-21-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I partially changed this to lazily update after a thread update in commit c9fa0414, but unfortunately didn't investigate the reason for the color update while setting a flag. Since it was that way, I assumed it was for a purpose. However, it turns out there is no need to actively set the header color in that function. Many places in Mutt already simply reset the color values to 0 to invalidate and cause a recheck later. Setting the color there so can even be detrimental, if the user has slow 'color index' lines. For example doing a <tag-pattern>~A will cause the color to be computed for the *entire* mailbox. Now, the user ought to not have a slow color index line, but if they do, this causes unnecessary pain. Note that the header->color doesn't have an actual "unset" value, which could also help performance. Maybe in the future in master branch.
* | Merge branch 'stable'Kevin McCarthy2022-11-19-1/+1
|\|
| * Filter U+200C in pager.Kevin McCarthy2022-11-15-1/+1
| | | | | | | | "U+200C ZERO WIDTH NON-JOINER" is generating '?' on some systems.
* | Merge branch 'stable'Kevin McCarthy2022-11-12-4/+73
|\|
| * automatic post-release commit for mutt-2.2.9Kevin McCarthy2022-11-12-1/+64
| |
| * Update UPDATING file for 2.2.9.Kevin McCarthy2022-11-12-0/+4
| |
| * Document the <1234> key syntax for bind.Kevin McCarthy2022-11-12-3/+5
| | | | | | | | | | This is useful for octal values of greater (or less) than three digits.