]> granicus.if.org Git - mutt/log
mutt
5 years agoAlternative close implementation. kevin/imap-delete-current
Kevin McCarthy [Wed, 20 Mar 2019 09:38:16 +0000 (17:38 +0800)]
Alternative close implementation.

5 years agoSend CLOSE when deleting the current mailbox in IMAP.
Kevin McCarthy [Tue, 19 Mar 2019 09:06:33 +0000 (17:06 +0800)]
Send CLOSE when deleting the current mailbox in IMAP.

Some IMAP servers don't like it if the currently selected mailbox is
deleted.  In those cases, send a CLOSE command before issuing any
other commands.

5 years agobrowser.c: Convert f parameter to BUFFER.
Kevin McCarthy [Tue, 12 Mar 2019 06:25:42 +0000 (14:25 +0800)]
browser.c: Convert f parameter to BUFFER.

5 years agobrowser.c: Convert other browser local variables to BUFFER.
Kevin McCarthy [Tue, 12 Mar 2019 05:56:51 +0000 (13:56 +0800)]
browser.c: Convert other browser local variables to BUFFER.

5 years agobrowser.c: Convert buf to BUFFER.
Kevin McCarthy [Tue, 12 Mar 2019 05:26:37 +0000 (13:26 +0800)]
browser.c: Convert buf to BUFFER.

5 years agobrowser.c: Convert prefix to BUFFER.
Kevin McCarthy [Tue, 12 Mar 2019 04:46:56 +0000 (12:46 +0800)]
browser.c: Convert prefix to BUFFER.

5 years agobrowser.c: Convert LastDir and LastDirBackup to BUFFER.
Kevin McCarthy [Mon, 11 Mar 2019 11:08:52 +0000 (19:08 +0800)]
browser.c: Convert LastDir and LastDirBackup to BUFFER.

Add a cleanup method call to main to free the BUFFERS.

Add mutt_buffer_concat_path() buffer helper function.

5 years agoAdd mutt_getcwd().
Kevin McCarthy [Mon, 11 Mar 2019 09:38:58 +0000 (17:38 +0800)]
Add mutt_getcwd().

5 years agoAdd mutt_buffer_strcpy_n().
Kevin McCarthy [Mon, 11 Mar 2019 09:38:18 +0000 (17:38 +0800)]
Add mutt_buffer_strcpy_n().

5 years agoFixes to mutt_buffer_expand_path().
Kevin McCarthy [Mon, 11 Mar 2019 09:04:28 +0000 (17:04 +0800)]
Fixes to mutt_buffer_expand_path().

Create _mutt_buffer_expand_path() with the rx argument.

Use mutt_b2s() instead of derefencing buffer->data in
mutt_buffer_expand_path().  The p->data uses were safe, but the
src->data was potentially not.

5 years agoMerge branch 'stable'
Kevin McCarthy [Wed, 13 Mar 2019 05:47:18 +0000 (13:47 +0800)]
Merge branch 'stable'

5 years agoautomatic post-release commit for mutt-1.11.4 mutt-1-11-4-rel
Kevin McCarthy [Wed, 13 Mar 2019 05:41:00 +0000 (13:41 +0800)]
automatic post-release commit for mutt-1.11.4

5 years agoMerge branch 'stable'
Kevin McCarthy [Wed, 13 Mar 2019 04:39:13 +0000 (12:39 +0800)]
Merge branch 'stable'

5 years agoFix incorrect IMAP message purging bug.
Kevin McCarthy [Wed, 13 Mar 2019 04:06:11 +0000 (12:06 +0800)]
Fix incorrect IMAP message purging bug.

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
set.

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.

5 years agoAdd mutt_buffer_expand_path().
Kevin McCarthy [Sun, 10 Mar 2019 05:27:11 +0000 (13:27 +0800)]
Add mutt_buffer_expand_path().

TODO: '@' expansion using mutt_default_save() is still using a fixed size
string parameter.

Convert imap_expand_path() and mutt_rx_sanitize_string() to use
BUFFERS instead.

Add url_ciss_tobuffer().

5 years agoFix imap_pretty_mailbox() call to url_ciss_tostring().
Kevin McCarthy [Sun, 10 Mar 2019 12:05:12 +0000 (20:05 +0800)]
Fix imap_pretty_mailbox() call to url_ciss_tostring().

Pass the correct buffer size through, so the strfcpy added in the next
commit doesn't write past the end of the buffer.

5 years agoMove mutt_rx_sanitize_string() to muttlib.c
Kevin McCarthy [Sun, 10 Mar 2019 05:35:26 +0000 (13:35 +0800)]
Move mutt_rx_sanitize_string() to muttlib.c

So it can be converted to use BUFFER.

5 years agoImprove imap uid seqset hcache buffer usage.
Kevin McCarthy [Sun, 10 Mar 2019 02:03:52 +0000 (10:03 +0800)]
Improve imap uid seqset hcache buffer usage.

mutt_buffer_increase_size() terminates the buffer, so there is no need
to explicitly check for an empty buffer after the
imap_msn_index_to_uid_seqset() call.

5 years agoMinor buffer handling code cleanup.
Kevin McCarthy [Sun, 10 Mar 2019 01:58:07 +0000 (09:58 +0800)]
Minor buffer handling code cleanup.

Use mutt_buffer_len() and mutt_buffer_clear() to make the code a bit
clearer.  There are still places in the code that manipulate the
buffers directly (pattern.c, for example), but that doesn't mean we
shouldn't abstract the buffer where we can.

Add comments in a couple places where unusual buffer manipulation is
occurring.

5 years agoAdd "Message Composition Flow" section to manual.
Kevin McCarthy [Sat, 9 Mar 2019 11:12:19 +0000 (19:12 +0800)]
Add "Message Composition Flow" section to manual.

This provides a brief overview of the steps during message
composition, and shows when the various hooks are executed.

5 years agoExpand a couple of the comments about charset.
Kevin McCarthy [Sat, 9 Mar 2019 07:03:00 +0000 (15:03 +0800)]
Expand a couple of the comments about charset.

Make it clearer what BODY->charset is used for, and why we are
checking for !noconv during mailcap charset parameter expansion.

5 years agoCheck noconv for mailcap %{charset} send mode expansion.
Kevin McCarthy [Fri, 8 Mar 2019 11:48:41 +0000 (19:48 +0800)]
Check noconv for mailcap %{charset} send mode expansion.

Improve the previous commit by checking to make sure a->noconv also
isn't set.  If noconv is set, we ignore any value a->charset might
have picked up during previous encoding checks.

5 years agoFix mailcap %{charset} expansion in send mode.
Kevin McCarthy [Fri, 8 Mar 2019 10:06:52 +0000 (18:06 +0800)]
Fix mailcap %{charset} expansion in send mode.

Use the current charset of the file for the parameter, since the file
hasn't been converted yet.

5 years agoUse gpgme recipient strings for encryption when available.
Kevin McCarthy [Mon, 4 Mar 2019 07:05:50 +0000 (15:05 +0800)]
Use gpgme recipient strings for encryption when available.

For gpgme >= 1.11.0, use gpgme_op_encrypt_ext() and
gpgme_op_encrypt_sign_ext() to specify recipients as a string.

This allows '!' to specify forcing a subkey, as is the case in classic
gpg and from the command line.

Remove the '!' "force valid" usage for the newer version.

5 years agoAdd $include_encrypted config to prevent reply-decryption attack.
Kevin McCarthy [Fri, 22 Feb 2019 21:50:52 +0000 (13:50 -0800)]
Add $include_encrypted config to prevent reply-decryption attack.

@jensvoid, in cooperation with Ruhr-Uni Bochum and FH Münster,
Germany, reported a possible "Oracle decryption" attack on various
mail clients.  An attacker could include previously encrypted contents
they obtained access to, and include it in a message.  Replying
without trimming would include the decrypted contents.

This attack relies on several "ifs", and is more dangerous for clients
that compose HTML mail.  However, it is still an issue that an
unwary/busy Mutt user could fall for.

Add a new config $include_encrytped, defaulting off, to reduce the
possibility of the user being unaware of previously encrypted parts in
the reply.  Only the main initial encrypted part will be included in
the reply.

5 years agoAdd additional search names for docbook texi conversion program.
Kevin McCarthy [Sat, 23 Feb 2019 20:12:36 +0000 (12:12 -0800)]
Add additional search names for docbook texi conversion program.

On Arch, it is called docbook2text

5 years agoFix truncation of long filenames in attachments.
Andrey Skvortsov [Thu, 21 Feb 2019 13:37:05 +0000 (16:37 +0300)]
Fix truncation of long filenames in attachments.

Currently mutt truncates long filenames in attachments and doesn't
take into account UTF-8 character size. If filename is truncated in
the middle of multi-byte UTF-8 character (last character is bad),
then some mail clients assume whole attachment name bad and don't
display its name (use 'Noname' instead).

Filenames can be up to 255 *characters* long depending on used
filesystem. ReiserFS, NFTS, FAT, APFS and some other supports up to
255 characters.
In the worst case 255 characters in UTF-8 will take 255*4 = 1020
bytes. Every non-ascii byte in the filename will be encoded using 3
bytes (for example, %8D).
So 'Content-Disposition' will take in the worst case up to: 1020*3 =
3060 bytes. Therefore even LONG_STRING (1024) isn't enough.

5 years agoCheck the base64 decoding retval in auth_gss.
Kevin McCarthy [Wed, 13 Feb 2019 03:04:28 +0000 (19:04 -0800)]
Check the base64 decoding retval in auth_gss.

Abort if the value is not decodable.

5 years agoChange auth_gss to to use buffers and the buffer pool.
Kevin McCarthy [Wed, 13 Feb 2019 00:41:07 +0000 (16:41 -0800)]
Change auth_gss to to use buffers and the buffer pool.

Ticket #100 revealed that even a bufsize of 8192 isn't guaranteed to
be big enough.  Convert those large buffers to use the buffer pool
instead.

5 years agoAdd mutt_buffer helpers for base64 conversion.
Kevin McCarthy [Tue, 12 Feb 2019 23:58:13 +0000 (15:58 -0800)]
Add mutt_buffer helpers for base64 conversion.

Add mutt_buffer_from_base64() mutt_buffer_to_base64() to help with
transitioning to buffers.

5 years agoAdd mutt_buffer_len() helper.
Kevin McCarthy [Tue, 12 Feb 2019 23:48:09 +0000 (15:48 -0800)]
Add mutt_buffer_len() helper.

5 years agoUpdated French translation.
Vincent Lefevre [Thu, 7 Feb 2019 22:48:09 +0000 (23:48 +0100)]
Updated French translation.

5 years agoCreate <group-chat-reply> function.
Kevin McCarthy [Wed, 6 Feb 2019 22:29:42 +0000 (14:29 -0800)]
Create <group-chat-reply> function.

This function differs from <group-reply> only in that it preserves To
recipients in the original email as To recipients in the reply.

The merits of this function aren't without controversy; therefore it
is left unbound by default.  Those who care about such things are free
to bind it.

Combine reply operation handlers in the pager and curs_main, since the
code was the same with the exception of the flags used.

5 years agoUpdated French translation.
Vincent Lefevre [Wed, 6 Feb 2019 12:58:42 +0000 (13:58 +0100)]
Updated French translation.

5 years agocorrected typo from dad0eb255fddbef5f14772b85b32acf6f2ca7996
Vincent Lefevre [Wed, 6 Feb 2019 12:53:30 +0000 (13:53 +0100)]
corrected typo from dad0eb255fddbef5f14772b85b32acf6f2ca7996

5 years agoAdd an error message for <descend-directory>.
Kevin McCarthy [Sat, 2 Feb 2019 23:35:34 +0000 (15:35 -0800)]
Add an error message for <descend-directory>.

Don't allow the operation on a non-directory.  Print a message
indicating it's not a directory.

5 years agoSeparate out op variable in the browser.
Kevin McCarthy [Sat, 2 Feb 2019 23:03:03 +0000 (15:03 -0800)]
Separate out op variable in the browser.

The i variable is used in several places and scopes as a temporary
index variable, but is also used to record the current operation.
Separate them out to make the code less confusing.

5 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 1 Feb 2019 20:52:58 +0000 (12:52 -0800)]
Merge branch 'stable'

5 years agoautomatic post-release commit for mutt-1.11.3 mutt-1-11-3-rel
Kevin McCarthy [Fri, 1 Feb 2019 20:41:23 +0000 (12:41 -0800)]
automatic post-release commit for mutt-1.11.3

5 years agoUpdate UPDATING file for 1.11.3 release.
Kevin McCarthy [Fri, 1 Feb 2019 20:34:19 +0000 (12:34 -0800)]
Update UPDATING file for 1.11.3 release.

5 years agoAllow descending into maildir and mh directories in file browser
Corey Minyard [Thu, 31 Jan 2019 23:57:57 +0000 (17:57 -0600)]
Allow descending into maildir and mh directories in file browser

Some (maybe most) IMAP mail systems allow folders to be nested inside
folders, so you can have, say, an Inbox with more folders inside it.
However, in the file browser, mutt will only open a maildir/mh
directory as a mailbox, there is no way to get to the child mailboxes.

This change adds a function <descend-directory> that forces mutt to
descend into the directory.  It is unbound by default.

Signed-off-by: Corey Minyard <minyard@acm.org>
5 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 25 Jan 2019 02:51:55 +0000 (18:51 -0800)]
Merge branch 'stable'

5 years agoShow top-level decoded smime text/plain parts.
Kevin McCarthy [Fri, 25 Jan 2019 02:28:27 +0000 (18:28 -0800)]
Show top-level decoded smime text/plain parts.

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.

5 years agoSimplify nested smime handling in the attachment menu.
Kevin McCarthy [Thu, 24 Jan 2019 23:19:36 +0000 (15:19 -0800)]
Simplify nested smime handling in the attachment menu.

Since changeset 2fd6f99b allows nested encryption handling, there is
no need to deal with the nesting directly.  Instead, just recursive as
with other nested handling.

5 years agoMerge branch 'stable'
Kevin McCarthy [Thu, 24 Jan 2019 23:07:36 +0000 (15:07 -0800)]
Merge branch 'stable'

5 years agoImprove attachment menu for s/mime parts. (closes #113)
Kevin McCarthy [Thu, 24 Jan 2019 22:15:33 +0000 (14:15 -0800)]
Improve attachment menu for s/mime parts. (closes #113)

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 years agoMerge branch 'stable'
Kevin McCarthy [Tue, 22 Jan 2019 03:45:28 +0000 (19:45 -0800)]
Merge branch 'stable'

5 years agoFix tunnels to also retry and write full buffer.
Kevin McCarthy [Tue, 22 Jan 2019 03:43:08 +0000 (19:43 -0800)]
Fix tunnels to also retry and write full buffer.

Change the tunnel_socket_read() and tunnel_socket_write() as the raw
sockets were adjusted in the previous commit.  Retry on EINTR, and
complete a full write so all the implementations have the same behavior.

5 years agoMerge branch 'stable'
Kevin McCarthy [Mon, 21 Jan 2019 23:34:46 +0000 (15:34 -0800)]
Merge branch 'stable'

5 years agoFix raw socket read/write to follow expected behavior.
Kevin McCarthy [Mon, 21 Jan 2019 23:19:08 +0000 (15:19 -0800)]
Fix raw socket read/write to follow expected behavior.

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.

5 years agoRemove mutt_socket_read().
Kevin McCarthy [Mon, 21 Jan 2019 22:16:13 +0000 (14:16 -0800)]
Remove mutt_socket_read().

It is not used anywhere in the code.

Additionally, it does not interact correctly with
mutt_socket_readchar() and mutt_socket_readln_d(), which use an
internal input buffer: conn->inbuf.

If reading a specific chunksize is needed in future, the function can
be easily recreated to use the inbuf.

5 years agoMerge branch 'stable'
Kevin McCarthy [Mon, 21 Jan 2019 20:11:27 +0000 (12:11 -0800)]
Merge branch 'stable'

5 years agoConvert to use gitlab registry image ubuntu:18.04.
Kevin McCarthy [Fri, 30 Nov 2018 23:12:47 +0000 (15:12 -0800)]
Convert to use gitlab registry image ubuntu:18.04.

The gitlab registry image is built using the Dockerfile in
muttmua/docker-images/tree/master/ubuntu/18.04/

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 f34cb1fb8468f74894818343dd8d95da5c0c640d)

5 years agoMerge branch 'stable'
Kevin McCarthy [Mon, 21 Jan 2019 20:02:54 +0000 (12:02 -0800)]
Merge branch 'stable'

5 years agoFix gnutls tls_socket_write() to properly retry.
Kevin McCarthy [Mon, 21 Jan 2019 19:56:04 +0000 (11:56 -0800)]
Fix gnutls tls_socket_write() to properly retry.

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).

5 years agoChange $pgp_use_gpg_agent to default set.
Kevin McCarthy [Sat, 19 Jan 2019 23:23:32 +0000 (15:23 -0800)]
Change $pgp_use_gpg_agent to default set.

GnuPG 2.1.0, released in 2014-11-06, automatically spawns an agent.
After 4+ years, it has reached wide enough usage to merit changing the
default.

5 years agoMerge branch 'stable'
Kevin McCarthy [Sat, 19 Jan 2019 05:01:09 +0000 (21:01 -0800)]
Merge branch 'stable'

5 years agoUpdate the muttrc man page with added commands.
Kevin McCarthy [Sat, 19 Jan 2019 04:46:07 +0000 (20:46 -0800)]
Update the muttrc man page with added commands.

Add the "color compose", index-format-hook, and echo commands.

Add the HMS relative date units.

5 years agoMerge branch 'stable'
Kevin McCarthy [Sat, 19 Jan 2019 03:46:33 +0000 (19:46 -0800)]
Merge branch 'stable'

5 years agoWrap ssl init calls for LibreSSL too.
Kevin McCarthy [Thu, 10 Jan 2019 17:56:41 +0000 (09:56 -0800)]
Wrap ssl init calls for LibreSSL too.

It looks like LibreSSL does not perform automatic initialization of
the library and error strings.

Since LibreSSL defines OPENSSL_VERSION_NUMBER as a "version 2",
add a check if LIBRESSL_VERSION_NUMBER is defined and call the
initialization functions for that case.

5 years agoUpdated date of the mutt(1) man page.
Vincent Lefevre [Fri, 18 Jan 2019 12:59:05 +0000 (13:59 +0100)]
Updated date of the mutt(1) man page.

5 years agoUpdated date of the muttrc(5) man page.
Vincent Lefevre [Fri, 18 Jan 2019 12:57:20 +0000 (13:57 +0100)]
Updated date of the muttrc(5) man page.

5 years agoAdd attributes support on color declarations
Muh Muhten [Tue, 15 Jan 2019 06:17:02 +0000 (01:17 -0500)]
Add attributes support on color declarations

color now accepts zero or more attributes words before the foreground.

Also more or less resolves the issue that setting the color of an object
which defaults to underline/reverse is irreversible.

6 years agoMerge branch 'stable'
Kevin McCarthy [Thu, 10 Jan 2019 17:45:13 +0000 (09:45 -0800)]
Merge branch 'stable'

6 years agomx_open_mailbox: provide output buffer to realpath(3)
Fabian Groffen [Thu, 10 Jan 2019 15:03:02 +0000 (16:03 +0100)]
mx_open_mailbox: provide output buffer to realpath(3)

Starting with POSIX.1.2008 resolved_path can be NULL.
Systems implementing a standard before that crash.  Example of such
system is Mac OS X 10.5, the last version running on PowerPC hardware.

Since this is the only occurrance of the realpath(3) function in Mutt,
instead of wrapping it, just adjust this invocation.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
6 years agoMerge branch 'stable'
Kevin McCarthy [Tue, 8 Jan 2019 21:10:06 +0000 (13:10 -0800)]
Merge branch 'stable'

6 years agoFix compilation with LibreSSL <2.7.0. (closes #112)
Stefan Strogin [Tue, 8 Jan 2019 19:18:38 +0000 (21:18 +0200)]
Fix compilation with LibreSSL <2.7.0. (closes #112)

(cherry picked from commit 9c9bea5e04e2a562017af0ac7a27b1b0e00e8907)

6 years agoFix compilation with LibreSSL <2.7.0. (closes #112)
Stefan Strogin [Tue, 8 Jan 2019 19:18:38 +0000 (21:18 +0200)]
Fix compilation with LibreSSL <2.7.0. (closes #112)

6 years agoMerge branch 'stable'
Kevin McCarthy [Tue, 8 Jan 2019 01:49:27 +0000 (17:49 -0800)]
Merge branch 'stable'

6 years agoautomatic post-release commit for mutt-1.11.2 mutt-1-11-2-rel
Kevin McCarthy [Tue, 8 Jan 2019 01:39:19 +0000 (17:39 -0800)]
automatic post-release commit for mutt-1.11.2

6 years agoAdd UPDATING notes for 1.11.2 release.
Kevin McCarthy [Tue, 8 Jan 2019 01:26:53 +0000 (17:26 -0800)]
Add UPDATING notes for 1.11.2 release.

6 years agoFix mkdtemp() random signedness
Eike Rathke [Sat, 5 Jan 2019 21:54:26 +0000 (22:54 +0100)]
Fix mkdtemp() random signedness

time_t return of time() may be signed 32-bit and in that case
probably will roll over in the year 2038 and yield a negative
value; signedness was propagated in the XOR operation to the
'value' and then 'v' variables. The 'v % 62' operation then would
had resulted in a negative value and LETTER[v%62] would had
accessed an arbitrary data location.

The same could had happened if the static long 'value' variable
after a very long run time contained a sufficiently large value to
which the time^pid value added resulted in a wrap / roll-over to a
negative value.

Using unsigned long types for 'value' and 'v' and casting time_t
to unsigned long cures all this.

6 years agoMerge branch 'stable'
Kevin McCarthy [Sat, 5 Jan 2019 21:29:11 +0000 (13:29 -0800)]
Merge branch 'stable'

6 years agoUpdate copyright for the next stable release.
Kevin McCarthy [Sat, 5 Jan 2019 21:25:38 +0000 (13:25 -0800)]
Update copyright for the next stable release.

6 years agoFix a few indenting issues.
Kevin McCarthy [Sat, 5 Jan 2019 20:37:16 +0000 (12:37 -0800)]
Fix a few indenting issues.

These are mostly the result of making the formatting changes commit
after the indent changes commit.

6 years agoClean up formatting.
Kevin McCarthy [Sat, 5 Jan 2019 02:45:01 +0000 (18:45 -0800)]
Clean up formatting.

Add spaces after if, else, while, for, switch.

Unify the brace placement style.  The vast majority of the code uses
Allman style so convert the relatively few K&R braces over.

6 years agoClean up code indentation.
Kevin McCarthy [Fri, 4 Jan 2019 03:58:18 +0000 (19:58 -0800)]
Clean up code indentation.

These are mostly automated changes corresponding to the emacs
settings:
  (c-set-style "linux")
  (setq c-basic-offset 2)
  (c-set-offset 'case-label '+)

Most of the code follows the convention:
  (add-to-list 'c-cleanup-list 'space-before-funcall)
but this is not enforced by this indentation cleanup.

Also, I personally dislike tabs, so I have:
  (setq-default indent-tabs-mode nil)
in my own configuration.  However I have no desire to change every line
just for that effect.  So this cleanup does nothing about the mix issue.

Some of the secondary files (e.g. regex.c) have been skipped.

I've also skipped crypt-gpgme.c, because I need to think about that
file.  Werner Koch and the GnuPG team contributed most it, and it
follows the Gnu indentation settings.  It should probably be made
uniform with Mutt, but I don't want to discourage future GnuPG
contribution to the file.

I manually reverted a few unsightly cleanups, and added a few tweeks
when I saw things that could be improved.

6 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 4 Jan 2019 19:22:18 +0000 (11:22 -0800)]
Merge branch 'stable'

6 years agoFix mkdtemp.c implementation.
Kevin McCarthy [Fri, 4 Jan 2019 19:20:05 +0000 (11:20 -0800)]
Fix mkdtemp.c implementation.

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
used.

6 years agoSleep $sleep_time after displaying "mail sent" message.
Kevin McCarthy [Tue, 1 Jan 2019 19:24:11 +0000 (11:24 -0800)]
Sleep $sleep_time after displaying "mail sent" message.

In case returning the index displays some kind of error right away, to
give time to see the success message.

6 years agoRemove trailing whitespace.
Kevin McCarthy [Tue, 1 Jan 2019 00:06:53 +0000 (16:06 -0800)]
Remove trailing whitespace.

The result of
  find . -name "*.[ch]" -exec emacs -batch {} \
    --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;

6 years agoRemove unused MUTT_FORMAT_MAKEPRINT flag.
Kevin McCarthy [Mon, 31 Dec 2018 23:39:04 +0000 (15:39 -0800)]
Remove unused MUTT_FORMAT_MAKEPRINT flag.

The code in mutt_FormatString() that was using it was commented out 19
years ago.

6 years agoRemove dead code.
Kevin McCarthy [Mon, 31 Dec 2018 22:19:44 +0000 (14:19 -0800)]
Remove dead code.

Most of these have been "#if 0" out for 10-20 years.  Any utility in
keeping them around is miniscule at this point.

There are a few other "#if 0" in the code, but I've kept them for now.
Some are utility functions that are not used, but I think still may
have some documentation value.

6 years agoFix config variable order.
Kevin McCarthy [Sat, 29 Dec 2018 23:13:15 +0000 (15:13 -0800)]
Fix config variable order.

6 years agoRespect ignore for the protected subject display.
Kevin McCarthy [Sat, 29 Dec 2018 21:50:00 +0000 (13:50 -0800)]
Respect ignore for the protected subject display.

6 years agoColor protected subject as a header in the pager.
Kevin McCarthy [Sat, 29 Dec 2018 21:20:03 +0000 (13:20 -0800)]
Color protected subject as a header in the pager.

6 years agoAdd $crypt_protected_headers_save.
Kevin McCarthy [Thu, 27 Dec 2018 20:05:43 +0000 (12:05 -0800)]
Add $crypt_protected_headers_save.

Setting this option will save the protected header back into the
clear-text message headers.  This improves
usability (searching/limiting/replying) when reopening a mailbox
without header cache.  However, it is a security trade-off, so
defaults off and strongly warns about what it is doing in the documentation.

6 years agoChange x-label editing flag to be in the envelope.
Kevin McCarthy [Wed, 26 Dec 2018 03:52:53 +0000 (19:52 -0800)]
Change x-label editing flag to be in the envelope.

Handle like In-Reply-To and References editing.  Change the flag
setting to be inside mutt_copy_header().

The resetting of the changed flag occurs explicitly in the imap and
maildir/mh sync_mailbox code.  It occurs for mbox in the
mx_update_tables() call in mx_sync_mailbox().

6 years agoCreate envelope->changed to mark all field changes.
Kevin McCarthy [Wed, 26 Dec 2018 03:24:08 +0000 (19:24 -0800)]
Create envelope->changed to mark all field changes.

In subsequent commits, we're going to add the x-label and subject
headers changed flags into the envelope.  To avoid the list of checks
exploding everywhere, just use a single field to check and reset those
values.

Several places in the code are checking for a null header->env.  I
wasn't aware this was possible, so I've added todo notes to track down
when this occurs.

6 years agoLight colors: do not do the + 8 on negative values, such as COLOR_DEFAULT.
Vincent Lefevre [Sat, 29 Dec 2018 19:08:26 +0000 (20:08 +0100)]
Light colors: do not do the + 8 on negative values, such as COLOR_DEFAULT.

6 years agoAdded support for the "light" color prefix (in addition to "bright").
Vincent Lefevre [Sat, 29 Dec 2018 18:37:57 +0000 (19:37 +0100)]
Added support for the "light" color prefix (in addition to "bright").

At the same time, restrict the advance by 8 to colors in the range 0-7
and no longer use the blink attribute to emulate light background colors
in some terminals (e.g. linux console and rxvt), as this is really blink
in other terminals (e.g. xterm); light background colors can still be
obtained by choosing a proper $TERM value (tested with linux console,
using TERM=linux-16color, and rxvt).

6 years agoUpdated French translation.
Vincent Lefevre [Sat, 29 Dec 2018 17:17:43 +0000 (18:17 +0100)]
Updated French translation.

6 years agospelling consistency
Vincent Lefevre [Sat, 29 Dec 2018 17:03:27 +0000 (18:03 +0100)]
spelling consistency

6 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 28 Dec 2018 23:53:15 +0000 (15:53 -0800)]
Merge branch 'stable'

6 years agoMake a copy of x_label before encoding it for updates.
Kevin McCarthy [Fri, 28 Dec 2018 23:43:51 +0000 (15:43 -0800)]
Make a copy of x_label before encoding it for updates.

This isn't actually a bug.  Context->label_hash strdups the keys, so
we are safe from dangling references.  However, the subj_hash uses
direct references, so to keep things consistent and safe, make a copy
and encode that.

6 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 28 Dec 2018 00:27:24 +0000 (16:27 -0800)]
Merge branch 'stable'

6 years agoRestore the xlabel_changed reset.
Kevin McCarthy [Fri, 28 Dec 2018 00:24:27 +0000 (16:24 -0800)]
Restore the xlabel_changed reset.

The cherry pick accidentally obliterated the reset.  That flag is now
located in hdr->env->changed in the branch and is reset properly
elsewhere.  Keep it in place in the stable branch.

6 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 28 Dec 2018 00:16:04 +0000 (16:16 -0800)]
Merge branch 'stable'

6 years agoRfc2047 encode and fold X-Label when writing updates.
Kevin McCarthy [Fri, 28 Dec 2018 00:08:36 +0000 (16:08 -0800)]
Rfc2047 encode and fold X-Label when writing updates.

Also, add a missing "skip" in mutt_copy_hdr() for the non-simple case.

These fixes were backported from the kevin/mutt_protected_header branch.

6 years agoMerge branch 'stable'
Kevin McCarthy [Thu, 27 Dec 2018 23:52:52 +0000 (15:52 -0800)]
Merge branch 'stable'