[dovecot/core] 28399e: lib-storage: Fix truncating header values at NUL w...

GitHub noreply at github.com
Thu Aug 30 11:30:15 EEST 2018


  Branch: refs/heads/master-2.3
  Home:   https://github.com/dovecot/core
  Commit: 28399e8ab320d4a481964b52e8696acf4e24699f
      https://github.com/dovecot/core/commit/28399e8ab320d4a481964b52e8696acf4e24699f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-storage/index/index-mail-headers.c

  Log Message:
  -----------
  lib-storage: Fix truncating header values at NUL when adding to cache

For example FETCH BODY.PEEK[HEADER.FIELDS (Subject)] could have returned
the NUL on the first fetch when the mail wasn't in dovecot.index.cache,
but the second FETCH would have returned it truncated at the NUL.


  Commit: 3a4767cc50e1e299080f68a05a4842579a2ddd63
      https://github.com/dovecot/core/commit/3a4767cc50e1e299080f68a05a4842579a2ddd63
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-snippet.c
    M src/lib-mail/test-message-snippet.c

  Log Message:
  -----------
  lib-mail: message_snippet_generate() - Ignore NULs without shrinking snippet size

Previously the NULs also weren't in the snippet content, but they were
included in the snippet size.


  Commit: 69bb57299476ac523c7a764c1785cdb1efeabb89
      https://github.com/dovecot/core/commit/69bb57299476ac523c7a764c1785cdb1efeabb89
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/rfc822-parser.c

  Log Message:
  -----------
  lib-mail: rfc822-parser: Don't truncate comment/quoted-string/domain-literal at NUL

The other tokens couldn't have contained NULs in the first place.


  Commit: 6b166eac6ad75767f3efb6fec9b5d1dc2306d031
      https://github.com/dovecot/core/commit/6b166eac6ad75767f3efb6fec9b5d1dc2306d031
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/doveadm/doveadm-dump-index.c

  Log Message:
  -----------
  doveadm dump: Don't truncate dovecot.index.cache values at NULs


  Commit: 84336f31620b956bf6b50735805857e74a7b6ccf
      https://github.com/dovecot/core/commit/84336f31620b956bf6b50735805857e74a7b6ccf
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/doveadm/doveadm-print-table.c

  Log Message:
  -----------
  doveadm: Fix table printer to not truncate output at NULs


  Commit: 7ca38609f2d8032466f62a0a14d276abb17bca32
      https://github.com/dovecot/core/commit/7ca38609f2d8032466f62a0a14d276abb17bca32
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/auth/db-checkpassword.c

  Log Message:
  -----------
  auth: checkpassword - Fail if input from script contains NULs

Previously the input was just silently truncated at NULs.


  Commit: 7d4c537da89d22d67afa020fb5c7c03055a83e1e
      https://github.com/dovecot/core/commit/7d4c537da89d22d67afa020fb5c7c03055a83e1e
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-dict-extra/dict-fs.c
    M src/lib-dict/dict-memcached-ascii.c
    M src/lib-dict/dict-redis.c

  Log Message:
  -----------
  dict-fs/memcached-ascii/redis: Consistently truncate value at NULs

The dict API currently doesn't support NULs in values, so they have to be
truncated. However, previously they were truncated at NULs, but more data
may have still been appended to the value. This could have produced
somewhat random results.


  Commit: f97e899f0e948c24769f4af737d03dc38bfe31be
      https://github.com/dovecot/core/commit/f97e899f0e948c24769f4af737d03dc38bfe31be
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/config/config-parser.c

  Log Message:
  -----------
  config: Consistently truncate value at the first NUL in value input file

When value contained "<file", the file was added as a value. The setting
values don't currently support NULs, so the value gets truncated at the
first NUL. However, the previous code could have appended more data to
the value. This could have produced somewhat confusing results.


  Commit: 7ec04b02fbb91c54be1b6a362d0d483255cb0f31
      https://github.com/dovecot/core/commit/7ec04b02fbb91c54be1b6a362d0d483255cb0f31
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-master/master-login.c
    M src/util/script-login.c

  Log Message:
  -----------
  lib-master, util: Consistently truncate tabescaped input at the first NUL

The NULs are supposed to come tab-escaped, so there's no need to support
actual NUL characters. The previous code truncated at NULs, but could
have kept appending more data to the value. This could have produced
somewhat random results.


  Commit: 60f04b9225ab439d16155282225d09c083021198
      https://github.com/dovecot/core/commit/60f04b9225ab439d16155282225d09c083021198
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/login-common/client-common-auth.c

  Log Message:
  -----------
  login-common: Consistently truncate client SASL input at first NUL

The input is supposed to be base64-encoded, so there's no need to support
actual NUL characters. The previous code truncated at NULs, but could have
kept appending more data to the value. This could have produced somewhat
random results.


  Commit: 888cfdcd96938b9fce40872fc911b9fdf082a267
      https://github.com/dovecot/core/commit/888cfdcd96938b9fce40872fc911b9fdf082a267
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/plugins/fts-squat/fts-backend-squat.c

  Log Message:
  -----------
  fts-squat: Fix truncating headers at NULs while indexing


  Commit: 6cc952b1a7a09bd56fd60af90e3ef0a90581bbf8
      https://github.com/dovecot/core/commit/6cc952b1a7a09bd56fd60af90e3ef0a90581bbf8
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/rfc2231-parser.c
    M src/lib-mail/rfc822-parser.c
    M src/lib-mail/rfc822-parser.h
    M src/lib-mail/test-rfc822-parser.c

  Log Message:
  -----------
  lib-mail: Change rfc822_parse_content_param() API to allow NULs in value

This was the only function in rfc822-parser.h that wasn't NUL-safe.
This won't fix anything, but it makes the rfc822-parser.h API fully
consistent with the NUL handling.

Normally rfc2231_parse() should be called instead of calling
rfc822_parse_content_param() directly, so this shouldn't break any plugins.


  Commit: c98c10e35d59f6b61707ab16e8ec9391e9c8026b
      https://github.com/dovecot/core/commit/c98c10e35d59f6b61707ab16e8ec9391e9c8026b
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/rfc822-parser.c
    M src/lib-mail/test-rfc822-parser.c

  Log Message:
  -----------
  lib-mail: rfc822-parser: Don't allow preserving escaped [CR]LF

It's not valid to have "\<CR>" or "\<LF>", so the old behavior isn't really
wrong either. However, rfc822_parse_quoted_string() callers are more likely
to expect that the output won't contain any [CR]LF so this new behavior is
a bit better.


  Commit: 5ee789654218dd32404b527674caec41bb1c6140
      https://github.com/dovecot/core/commit/5ee789654218dd32404b527674caec41bb1c6140
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/rfc822-parser.c
    M src/lib-mail/test-rfc822-parser.c

  Log Message:
  -----------
  lib-mail: rfc822-parser: Improve domain-literal parsing

Strip away folding whitespace. Treat any extra '[' as an error.


  Commit: 641f002309cf3e775f31022f2b024d57f7701350
      https://github.com/dovecot/core/commit/641f002309cf3e775f31022f2b024d57f7701350
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/rfc822-parser.c
    M src/lib-mail/test-rfc822-parser.c

  Log Message:
  -----------
  lib-mail: rfc822-parser: Strip away folding whitespace from comments


  Commit: 87945a069c6d78556532da32313edc354619bf9b
      https://github.com/dovecot/core/commit/87945a069c6d78556532da32313edc354619bf9b
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/rfc822-parser.c
    M src/lib-mail/rfc822-parser.h
    M src/lib-mail/test-rfc822-parser.c

  Log Message:
  -----------
  lib-mail: rfc822-parser: Add nul_replacement_char


  Commit: 102735b46f6c3ecfb76aa4f5ba64a78e167910a3
      https://github.com/dovecot/core/commit/102735b46f6c3ecfb76aa4f5ba64a78e167910a3
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-address.c
    M src/lib-mail/test-message-address.c

  Log Message:
  -----------
  lib-mail: message_address_parse*() - Replace NULs with 0x80

Instead of truncating the strings at NULs.


  Commit: ce7821c83d60a1c7c64249972edbe243c978eeb6
      https://github.com/dovecot/core/commit/ce7821c83d60a1c7c64249972edbe243c978eeb6
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/rfc2231-parser.c
    M src/lib-mail/rfc2231-parser.h
    M src/lib-mail/test-rfc2231-parser.c

  Log Message:
  -----------
  lib-mail: rfc2231_parse() - Replace NULs with 0x80

Instead of truncating the strings at NULs.


  Commit: e1e9ff101914dd415ee620980b7fe1530958f45c
      https://github.com/dovecot/core/commit/e1e9ff101914dd415ee620980b7fe1530958f45c
  Author: Sergey Kitov <sergey.kitov at open-xchange.com>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-header-parser.c
    M src/lib-mail/message-header-parser.h

  Log Message:
  -----------
  lib-mail: Add MESSAGE_HEADER_REPLACE_NULS_WITH_0x80 flag

The flag signals that input stream for message_parse_header() should replace
0x0 symbols with 0x80.


  Commit: 228e04c2d111cb04773d52b54a0b19b29c68a228
      https://github.com/dovecot/core/commit/228e04c2d111cb04773d52b54a0b19b29c68a228
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib/str.h

  Log Message:
  -----------
  lib: Improve str_append_n() comment


  Commit: 68087f1cd00948d8964ba1d951fe626670721d1e
      https://github.com/dovecot/core/commit/68087f1cd00948d8964ba1d951fe626670721d1e
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib/str.c
    M src/lib/str.h
    M src/lib/test-str.c

  Log Message:
  -----------
  lib: Add str_append_max()

It's otherwise the same as str_append_n(), except it takes const char* as
input instead of const void*. This, as well as its name, should make it
less likely to be used wrong when the input may legitimately have NULs.

The unit test is changed from str_append_n() to str_append_max(), because
str_append_n() will be deprecated.


  Commit: 5b426a25f3cf94beeb2ceadde08f0d05dd124258
      https://github.com/dovecot/core/commit/5b426a25f3cf94beeb2ceadde08f0d05dd124258
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/auth/auth-cache.c
    M src/auth/db-dict-cache-key.c
    M src/auth/db-ldap.c
    M src/auth/password-scheme-md5crypt.c
    M src/config/config-parser.c
    M src/config/doveconf.c
    M src/lib-dict-backend/dict-ldap.c
    M src/lib-dict/dict.c
    M src/lib-fs/fs-posix.c
    M src/lib-fs/fs-sis.c
    M src/lib-fts/fts-tokenizer-address.c
    M src/lib-http/http-auth.c
    M src/lib-http/http-header-parser.c
    M src/lib-http/http-parser.c
    M src/lib-http/http-url.c
    M src/lib-imap/imap-quote.c
    M src/lib-imap/imap-url.c
    M src/lib-imap/imap-utf7.c
    M src/lib-mail/message-header-parser.c
    M src/lib-mail/message-snippet.c
    M src/lib-mail/rfc822-parser.c
    M src/lib-mail/test-istream-dot.c
    M src/lib-mail/test-istream-header-filter.c
    M src/lib-mail/test-istream-qp-decoder.c
    M src/lib-mail/test-istream-qp-encoder.c
    M src/lib-mail/test-message-header-parser.c
    M src/lib-mail/test-message-parser.c
    M src/lib-settings/settings-parser.c
    M src/lib-settings/settings.c
    M src/lib-smtp/smtp-address.c
    M src/lib-smtp/smtp-parser.c
    M src/lib-smtp/smtp-reply-parser.c
    M src/lib-smtp/smtp-server-reply.c
    M src/lib-smtp/smtp-syntax.c
    M src/lib-storage/index/index-mail-headers.c
    M src/lib-storage/index/maildir/maildir-uidlist.c
    M src/lib-storage/index/mbox/mbox-save.c
    M src/lib-storage/index/mbox/mbox-sync-parse.c
    M src/lib-storage/mailbox-attribute.c
    M src/lib-storage/mailbox-list.c
    M src/lib-storage/mailbox-tree.c
    M src/lib/failures.c
    M src/lib/file-dotlock.c
    M src/lib/istream.c
    M src/lib/str-sanitize.c
    M src/lib/strescape.c
    M src/lib/test-path-util.c
    M src/lib/uri-util.c
    M src/plugins/fts-solr/fts-backend-solr-old.c
    M src/plugins/fts-solr/fts-backend-solr.c

  Log Message:
  -----------
  global: Replace str_append_n() with str_append_data() wherever possible

It shouldn't be possible for input to have NULs in any of these places.
This makes the extra NUL-check in str_append_n() unnecessary.


  Commit: b608e0b183731216ed0c7b20eebafd540bf3ecbd
      https://github.com/dovecot/core/commit/b608e0b183731216ed0c7b20eebafd540bf3ecbd
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib/strescape.c

  Log Message:
  -----------
  lib: str_append_[tab]unescaped(): Don't truncate input at NULs

For str_append_tabunescaped() the input is supposed to have NULs already
escaped though, so it was truncating only with invalid input.


  Commit: 265bdb725bf5f8426e6e596be25650787b11912f
      https://github.com/dovecot/core/commit/265bdb725bf5f8426e6e596be25650787b11912f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-fts/fts-tokenizer-address.c

  Log Message:
  -----------
  lib-fts: fts-tokenizer-address - Cleanup NUL handling in parent_data

The end result is anyway that the token will be truncated at the first NUL.
This change just makes the code a bit more understandable on where the
truncation will happen.


  Commit: 265ee27f3fad3c8239815f46fd4976b2e4b49276
      https://github.com/dovecot/core/commit/265ee27f3fad3c8239815f46fd4976b2e4b49276
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/config/doveconf.c
    M src/doveadm/dsync/dsync-mailbox-tree-sync.c
    M src/lib/failures.c
    M src/lib/var-expand.c

  Log Message:
  -----------
  global: Replace str_append_n() with str_append_max()


  Commit: 21dfb293b749a081dfeea23beb36bfdfdf907e18
      https://github.com/dovecot/core/commit/21dfb293b749a081dfeea23beb36bfdfdf907e18
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib/compat.h
    M src/lib/macros.h

  Log Message:
  -----------
  lib: Add ATTR_DEPRECATED macro


  Commit: 6ddeb520f4167e194eb5dbfa7f7ac8d63fcaf793
      https://github.com/dovecot/core/commit/6ddeb520f4167e194eb5dbfa7f7ac8d63fcaf793
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib/str.h

  Log Message:
  -----------
  lib: Mark str_append_n() deprecated

It was almost always used wrongly. Most of the time str_append_data()
should have been used instead. str_append_max() has the old functionality.


  Commit: a86d32d49b4164015d517be6109724b0cfca43fb
      https://github.com/dovecot/core/commit/a86d32d49b4164015d517be6109724b0cfca43fb
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-part-data.c

  Log Message:
  -----------
  lib-mail: message_part_*_parse_from_header() - Replace NULs with 0x80

This avoids truncation of Content-*, Subject, Message-ID, In-Reply-To and
Date headers in IMAP ENVELOPE, BODY and BODYSTRUCTURE replies. Of course,
NULs in headers are violating RFCs already, so the previous behavior wasn't
really wrong either.


  Commit: 0771805e6ee25088ece245e14ed89744fc7a3bf5
      https://github.com/dovecot/core/commit/0771805e6ee25088ece245e14ed89744fc7a3bf5
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-address.c
    M src/lib-mail/rfc2231-parser.c
    M src/lib-mail/rfc822-parser.c
    M src/lib-mail/rfc822-parser.h
    M src/lib-mail/test-rfc822-parser.c

  Log Message:
  -----------
  lib-mail: Change rfc822_parser_context.nul_replacement_char to string


  Commit: a5875be4f45ead2272d00637f8c7467c6e43fa5c
      https://github.com/dovecot/core/commit/a5875be4f45ead2272d00637f8c7467c6e43fa5c
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-part-data.c
    M src/lib-mail/rfc2231-parser.h
    M src/lib-mail/rfc822-parser.h
    M src/lib-mail/test-message-address.c
    M src/lib-mail/test-rfc2231-parser.c

  Log Message:
  -----------
  lib-mail: Change NUL -> 0x80 replacement to use unicode replacement char instead

Using 0x80 produces invalid UTF-8 output, which we should avoid. Some places
in Dovecot code already requires that input is valid UTF-8, so it's also
safer and easier to use the unicode replacement character.

Fixes: Panic: file fts-tokenizer-generic.c: line 210 (fts_tokenizer_generic_simple_next): assertion failed: (char_size > 0)


  Commit: 8fd288a82847f8f9b6d77b84294dbf9f7fb09062
      https://github.com/dovecot/core/commit/8fd288a82847f8f9b6d77b84294dbf9f7fb09062
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-header-parser.c
    M src/lib-mail/message-header-parser.h

  Log Message:
  -----------
  lib-mail: Remove MESSAGE_HEADER_REPLACE_NULS_WITH_0x80 flag

As mentioned in previous commit, 0x80 isn't valid UTF-8 and we shouldn't
encourage using it. This implementation also can't be easily changed to
use unicode replacement character without larger changes to istream-nonuls.

Reverts 95fba2c295bb84639dc64ca5c9f2ccb9edc00ba7.


  Commit: 2f2d9930ddef7de198eca2347a3e181fa833ad57
      https://github.com/dovecot/core/commit/2f2d9930ddef7de198eca2347a3e181fa833ad57
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/rfc822-parser.c
    M src/lib-mail/test-rfc822-parser.c

  Log Message:
  -----------
  lib-mail: Fix rfc822_parse_dot_atom() to reject if dot isn't followed by atom


  Commit: 3b34f177b77614830a4866eb604edd2857403a92
      https://github.com/dovecot/core/commit/3b34f177b77614830a4866eb604edd2857403a92
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/doveadm/doveadm-mail-fetch.c
    M src/lib-lda/mail-deliver.c
    M src/lib-mail/message-address.c
    M src/lib-mail/message-address.h
    M src/lib-mail/message-part-data.c
    M src/lib-mail/test-message-address.c
    M src/lib-smtp/smtp-params.c
    M src/lib-storage/index/index-search.c
    M src/lib-storage/index/index-sort.c
    M src/lib-storage/mail-storage-settings.c
    M src/plugins/fts/fts-build-mail.c

  Log Message:
  -----------
  lib-mail: message_address_parse() - Change fill_missing parameter to flags

This change allows adding more flags. The API is also backwards compatible
in a way that the old FALSE/TRUE values still map to compatible 0/1 flags.


  Commit: 2a867dc39c0bc1e9235309256b0927633b8cd01a
      https://github.com/dovecot/core/commit/2a867dc39c0bc1e9235309256b0927633b8cd01a
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-address.c
    M src/lib-mail/message-address.h
    M src/lib-mail/test-message-address.c

  Log Message:
  -----------
  lib-mail: Add MESSAGE_ADDRESS_PARSE_FLAG_NON_STRICT_DOTS

This code is somewhat copy&pasted from parse_local_part() in Pigeonhole.


  Commit: 7d4c43875e1eecdf320630f6bdd85a1d43404faa
      https://github.com/dovecot/core/commit/7d4c43875e1eecdf320630f6bdd85a1d43404faa
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-address.c
    M src/lib-mail/message-address.h
    M src/lib-mail/test-message-address.c

  Log Message:
  -----------
  lib-mail: Change MESSAGE_ADDRESS_PARSE_FLAG_NON_STRICT_DOTS to _FLAG_STRICT_DOTS

Generally we want it to be enabled everywhere, so it's easier to just enable
it by default.

(This is kept as a separate commit from the previous one so it'll be easy to
revert this in case we actually don't want this to be the default.)


  Commit: c56f8e22b5fadcc9a39e395e362d81d3942e8945
      https://github.com/dovecot/core/commit/c56f8e22b5fadcc9a39e395e362d81d3942e8945
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/test-message-address.c

  Log Message:
  -----------
  lib-mail: test-message-address - Test NULs in display-name


  Commit: ddfd59e781051aad98981ebdd62c5cf000b1f50e
      https://github.com/dovecot/core/commit/ddfd59e781051aad98981ebdd62c5cf000b1f50e
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/rfc822-parser.c
    M src/lib-mail/test-message-address.c

  Log Message:
  -----------
  lib-mail: rfc822-parser - Handle \<NUL> in quoted-string and domain-literal

It was already handled in comments. Previously this caused the strings and
domain-literals to be truncated at that position.


  Commit: 4e2d0eed993af02671750699603513035adc8e5c
      https://github.com/dovecot/core/commit/4e2d0eed993af02671750699603513035adc8e5c
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-part-data.c

  Log Message:
  -----------
  lib-mail: Cleanup - Rename internal hdr_strdup() to message_header_strdup()


  Commit: ce57fab524f9137868ec596c80a7e1aecc6d4a26
      https://github.com/dovecot/core/commit/ce57fab524f9137868ec596c80a7e1aecc6d4a26
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-mail/message-header-parser.c
    M src/lib-mail/message-header-parser.h
    M src/lib-mail/message-part-data.c

  Log Message:
  -----------
  lib-mail: Make message_header_strdup() public

Also move it to a better file.


  Commit: 6df4f4432752b9857db4dcb03aa48319fe8049f1
      https://github.com/dovecot/core/commit/6df4f4432752b9857db4dcb03aa48319fe8049f1
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-storage/index/index-mail-headers.c

  Log Message:
  -----------
  lib-storage: Fix NUL handling in mail_get_first_header*(), mail_get_headers*()

These functions return NUL-terminated values, so they got truncated whenever
a header value contained a NUL. Fix this by converting NULs to unicode
replacement characters in the output.


  Commit: 41ecdb63f1b98bdd04838ef0c4371206f81f4269
      https://github.com/dovecot/core/commit/41ecdb63f1b98bdd04838ef0c4371206f81f4269
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/lib-index/mail-cache-lookup.c

  Log Message:
  -----------
  lib-index: mail_cache_lookup_headers() - Allow using datastack pool

This fixes assert caused by 53712af0e7f357e7279d9ff03831428aae85aa45:
Panic: pool_data_stack_realloc(): stack frame changed


  Commit: a318cf4ac628dce0f0ffcb459cf11165ed8c792b
      https://github.com/dovecot/core/commit/a318cf4ac628dce0f0ffcb459cf11165ed8c792b
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/plugins/fts/fts-build-mail.c

  Log Message:
  -----------
  fts: Fix indexing mails with NULs in headers

After the first NUL all the rest of the string was converted to spaces.
This was broken already in the initial commit that attempted to fix this:
4d27f95c76bd008bb38f9c442567046da2b6ce14


  Commit: 7057aa9de15433d6ebb5a741ea46584ee2d2fd39
      https://github.com/dovecot/core/commit/7057aa9de15433d6ebb5a741ea46584ee2d2fd39
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-08-30 (Thu, 30 Aug 2018)

  Changed paths:
    M src/plugins/fts/fts-build-mail.c

  Log Message:
  -----------
  fts: Optimize replacing NULs in header


Compare: https://github.com/dovecot/core/compare/ebc4904b5cd0...7057aa9de154
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the dovecot-cvs mailing list