]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Mon, 14 Jun 2021 09:44:08 +0000 (12:44 +0300)]
configure.ac: Update to v2.3.14.1
Aki Tuomi [Mon, 24 May 2021 11:03:57 +0000 (14:03 +0300)]
NEWS: Add news for 2.3.14.1
Aki Tuomi [Tue, 8 Jun 2021 06:13:25 +0000 (09:13 +0300)]
lib-dict-extra: dict-fs - Escape unsafe paths
Change any path components that are `.` or `..` to `...` and `....`.
Prevents path traversal attacks.
Aki Tuomi [Tue, 8 Jun 2021 06:04:21 +0000 (09:04 +0300)]
lib-oauth2: Do not escape '.'
This is not really needed and just makes things difficult.
Aki Tuomi [Mon, 3 May 2021 06:58:29 +0000 (09:58 +0300)]
lib-oauth2: Add missing test_begin/test_end to token escape
Stephan Bosch [Fri, 21 May 2021 22:16:38 +0000 (00:16 +0200)]
lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability.
The input handler kept reading more commands even though the input was locked by
the STARTTLS command, thereby causing it to read the command pipelined beyond
STARTTLS. This causes a STARTTLS command injection vulerability.
Timo Sirainen [Thu, 1 Apr 2021 17:39:27 +0000 (20:39 +0300)]
lib-imap: imap_bodystructure_write() - Return error on corruption instead of assert-crash
This could happen if broken message_parts came from cache and
message_part->data was newly read from the mail input.
Timo Sirainen [Thu, 8 Apr 2021 12:04:42 +0000 (15:04 +0300)]
lib-storage: Split off index_mail_parse_bodystructure_full()
Timo Sirainen [Fri, 9 Apr 2021 11:09:17 +0000 (14:09 +0300)]
lib-imap: fuzz-imap-bodystructure - Change failures to i_panic() instead of i_fatal()
Timo Sirainen [Mon, 3 May 2021 10:15:17 +0000 (13:15 +0300)]
imap: Fix using SETMETADATA NIL to unset value
Broken by
923362d27d9b2428e301614673cb0efba3bf928f
Aki Tuomi [Wed, 14 Apr 2021 16:17:30 +0000 (19:17 +0300)]
lib-oauth2: test-oauth2-jwt - Fix linkage for openssl
Without whole archive option ssl_iostream_unref isn't
included in linkage, which will prevent libdcrypt from
loading openssl backend.
Aki Tuomi [Thu, 19 Nov 2020 17:55:42 +0000 (19:55 +0200)]
lib-oauth2: Ensure azp is escaped too
Aki Tuomi [Wed, 14 Apr 2021 10:47:16 +0000 (13:47 +0300)]
lib-oauth2: Add test for token escape
Aki Tuomi [Wed, 14 Apr 2021 11:12:16 +0000 (14:12 +0300)]
lib-oauth2: Improve identifier escaping function
Aki Tuomi [Sat, 10 Apr 2021 14:54:45 +0000 (17:54 +0300)]
lib-oauth2: Move identifier escaping to own function
Markus Valentin [Mon, 22 Mar 2021 12:04:15 +0000 (13:04 +0100)]
lib-compression: Get error with i_stream_get_error() so it's recursive
In some cases the iostream.error was NULL so the errno default message
was used. This fixes an regression introduced by
8b6142f9ba9 .
Aki Tuomi [Thu, 4 Mar 2021 07:52:40 +0000 (09:52 +0200)]
NEWS: Mention XZ/LZMA removal.
Aki Tuomi [Tue, 2 Mar 2021 08:55:53 +0000 (10:55 +0200)]
NEWS: Update news for 2.3.14
Josef 'Jeff' Sipek [Fri, 22 Jan 2021 19:00:21 +0000 (14:00 -0500)]
lib-compression: Remove xz/lzma write support
For now, we keep the read support to allow for a more gradual migration from
lzma/xz.
The code has bugs. Additionally, there is no benefit in keeping it around.
bzip2 or zstd (at maximum compression level) are likely better choices for
archival. For non-archival usecases, a light compression algorithm like
zstd (at low to medium compression level) or lz4 are better choices.
Aki Tuomi [Tue, 16 Feb 2021 11:39:02 +0000 (13:39 +0200)]
doc/example: 10-metrics.conf - Add metrics related settings
Aki Tuomi [Tue, 16 Feb 2021 11:25:40 +0000 (13:25 +0200)]
doc/eaxmple: 10-logging.conf - Update syntax example to point to online documentation
Timo Sirainen [Wed, 24 Feb 2021 15:51:19 +0000 (17:51 +0200)]
lib-mail: message-parser - Always properly finish parsed input
If the caller hadn't called message_parser_parse_next_block() after
seeing EOF in the istream, the deinit could have crashed with:
Panic: file message-parser.c: line 802 (message_parser_deinit_from_parts): assertion failed: (ctx->nested_parts_count == 0 || i_stream_have_bytes_left(ctx->input))
Siavash Tavakoli [Thu, 18 Feb 2021 16:25:50 +0000 (16:25 +0000)]
stats: openmetrics: Do microsecond to seconds conversion only for duration values
Other metrics should be exported with their values unchanged.
Martin Michaelis [Tue, 16 Feb 2021 20:06:50 +0000 (21:06 +0100)]
stats: openmentrics: Change histogram bucket unit to seconds
In
ae678116a79fff609cdf4fb1eb7eb3db2975bf1c the unit of durations was changed
from microseconds to seconds, but the `le` field in histograms is still in
microseconds.
Siavash Tavakoli [Thu, 18 Feb 2021 21:39:09 +0000 (21:39 +0000)]
stats: refactor duration field name into a macro
Stephan Bosch [Fri, 4 Jan 2019 08:57:37 +0000 (09:57 +0100)]
plugins: fts-solr: Use a private HTTP client.
This is a workaround for problems with the http_client_request_send_payload()
API that occur when several shared HTTP clients use this API at the same time
and payload sending gets interleaved.
Stephan Bosch [Fri, 4 Jan 2019 08:55:20 +0000 (09:55 +0100)]
plugins: fts: tika: Use a private HTTP client.
This is a workaround for problems with the http_client_request_send_payload()
API that occur when several shared HTTP clients use this API at the same time
and payload sending gets interleaved.
Aki Tuomi [Wed, 17 Feb 2021 09:16:58 +0000 (11:16 +0200)]
NEWS: Change 2.3.14 to release candidate
Aki Tuomi [Fri, 12 Feb 2021 12:45:39 +0000 (14:45 +0200)]
config: test-config-parser - Change filename to match .gitignore pattern
Aki Tuomi [Fri, 12 Feb 2021 12:32:01 +0000 (14:32 +0200)]
config: test-config-parser - Cleanup input file after test
Aki Tuomi [Wed, 10 Feb 2021 13:20:13 +0000 (15:20 +0200)]
NEWS: Add news for 2.3.14
Aki Tuomi [Mon, 8 Feb 2021 08:05:47 +0000 (10:05 +0200)]
lib-settings: test-settings-parser - Use ULL suffix
Some of the sizes do not fit to UL in 32 bit systems.
Aki Tuomi [Thu, 28 Jan 2021 15:04:37 +0000 (17:04 +0200)]
lib-mail: test-message-snippet - Add unit tests for multipart messages
Aki Tuomi [Wed, 3 Feb 2021 15:22:07 +0000 (17:22 +0200)]
lib-mail: test-message-snippet - Use test_assert_strcmp
Makes it easier to see what failed.
Aki Tuomi [Thu, 28 Jan 2021 14:52:10 +0000 (16:52 +0200)]
lib-mail: Reformat test-message-snippet.c
Aki Tuomi [Thu, 28 Jan 2021 15:01:38 +0000 (17:01 +0200)]
lib-mail: message-snippet - Stop building snippet on first non-empty part
When we have gotten some snippet out of first eligible part,
we can stop.
Aki Tuomi [Thu, 28 Jan 2021 14:48:05 +0000 (16:48 +0200)]
lib-mail: message-snippet - Do not stop on first non-text part
Some mail structures would break snippet generation because
the code would stop on multipart.
Aki Tuomi [Thu, 28 Jan 2021 09:07:32 +0000 (11:07 +0200)]
lib-mail: message-snippet - Free html parser before making new
If html parser has already been initialized, free it before restarting
the parser.
Fixes memory leak introduced by
7f7be2cbf68f8a202a688d5bc50f82483d461643
Aki Tuomi [Thu, 4 Feb 2021 09:25:22 +0000 (11:25 +0200)]
configure: Update version to 2.3.14
Aki Tuomi [Thu, 4 Feb 2021 06:59:29 +0000 (08:59 +0200)]
stats: stats-service-openmetrics - Use PRIdTIME_T for startup time
Aki Tuomi [Thu, 4 Feb 2021 06:57:24 +0000 (08:57 +0200)]
login: login-proxy - Fix type conflict
Aki Tuomi [Thu, 4 Feb 2021 06:54:59 +0000 (08:54 +0200)]
lib-mail: test-message-header-decode - Use ptrdiff_t for rep_char_len
The length is compared to a pointer difference, so using ptrdiff_t
squashes a warning.
Aki Tuomi [Thu, 4 Feb 2021 06:46:51 +0000 (08:46 +0200)]
lib-settings: test-setting-parser - Use correct type in test
SIZE uses uoff_t.
Aki Tuomi [Thu, 4 Feb 2021 06:45:37 +0000 (08:45 +0200)]
lib: backtrace - Use correct format modifier
Matches size_t correctly.
Aki Tuomi [Thu, 4 Feb 2021 06:44:46 +0000 (08:44 +0200)]
lib: test-time-util - Use correct types for test case
Fixes type mismatch on 32-bit systems.
Timo Sirainen [Tue, 19 Jan 2021 18:11:47 +0000 (19:11 +0100)]
master: Fix reopening log files on SIGUSR1
Timo Sirainen [Tue, 19 Jan 2021 18:11:20 +0000 (19:11 +0100)]
man: Clarify how doveadm log reopen works
Timo Sirainen [Thu, 28 Jan 2021 15:45:45 +0000 (16:45 +0100)]
dovecot.service.in: Update documentation URL
Timo Sirainen [Fri, 22 Jan 2021 11:19:05 +0000 (13:19 +0200)]
lib-master: test-event-stats - Fix unit test when compiling using build directory
When using build directory __FILE__ expands to
"../../../src/lib-master/test-event-stats.c", which doesn't match
"test-event-stats.c" what is normally used.
Aki Tuomi [Mon, 18 Jan 2021 16:14:47 +0000 (18:14 +0200)]
lib-master: test-event-stats - Cast test value to uint64_t
Paul Howarth [Mon, 4 Jan 2021 16:31:03 +0000 (16:31 +0000)]
lib: Fix timeval_cmp_margin for 32-bit systems
The test suite compares times with seconds values of -INT_MAX and
INT_MAX. The result of this comparison does not fit in a value of
type int and so the test suite fails on 32-bit systems where time_t
is an int. To fix this, calculations on seconds values are done
using long long integers.
Broken by
16ab5542
Timo Sirainen [Tue, 26 Jan 2021 15:44:46 +0000 (17:44 +0200)]
dsync: Use a better default vname escape character
A control character was a bit unreadable in strings.
Timo Sirainen [Tue, 26 Jan 2021 16:55:22 +0000 (18:55 +0200)]
dsync: Replace escape characters in outgoing mailbox names with alt_char
Especially when dsync is used for migration, we don't want to end up having
invalid mUTF7 mailbox names locally. Also, remote might not even be
configured to use the same escape character.
Timo Sirainen [Tue, 26 Jan 2021 16:54:53 +0000 (18:54 +0200)]
dsync: Send alt_char also to slave brain
Timo Sirainen [Mon, 18 Jan 2021 21:53:50 +0000 (23:53 +0200)]
lib-storage: mailbox_list_escape_name_params() - Assert that escape_char isn't NUL
Timo Sirainen [Fri, 15 Jan 2021 17:27:00 +0000 (19:27 +0200)]
imapc: Add comment explaining various mailbox names
Timo Sirainen [Mon, 18 Jan 2021 21:31:28 +0000 (23:31 +0200)]
imapc: fs mailbox_list - Remove vname_escape_char
This isn't necessary.
Timo Sirainen [Mon, 18 Jan 2021 21:30:28 +0000 (23:30 +0200)]
imapc: Add IMAPC_LIST_FS_NAME_ESCAPE_CHAR
This clarifies how the escape characters are used.
Timo Sirainen [Mon, 18 Jan 2021 21:23:37 +0000 (23:23 +0200)]
imapc: Add a default vname_escape_char
Having vname_escape_char guarantees that all the remote mailbox names are
accessible by escaping them as necessary.
Timo Sirainen [Mon, 18 Jan 2021 21:19:01 +0000 (23:19 +0200)]
imapc: Fix local filesystem directory name escaping
Use the remote mailbox name as the base. Convert the hierarchy separator
and add escaping as necessary.
The old method was based on storage_name, and it's a bit unclear if it
worked correctly in all situations.
Timo Sirainen [Sat, 16 Jan 2021 15:20:46 +0000 (17:20 +0200)]
imapc: Add imapc_list_remote_to_storage_name()
Timo Sirainen [Sat, 16 Jan 2021 13:03:59 +0000 (15:03 +0200)]
imapc: Fix remote/storage mailbox name mismatches
Timo Sirainen [Sat, 16 Jan 2021 13:00:06 +0000 (15:00 +0200)]
imapc: Use more explicit mailbox name variable names
Clearly specify which type of a mailbox name it is to avoid
misunderstandings.
Timo Sirainen [Sat, 16 Jan 2021 12:44:00 +0000 (14:44 +0200)]
imapc: Rename imapc_list_get_fs_name() to imapc_list_storage_to_fs_name()
Timo Sirainen [Sat, 16 Jan 2021 12:41:24 +0000 (14:41 +0200)]
imapc: Rename imapc_list_to_vname() to imapc_list_remote_to_vname()
Timo Sirainen [Sat, 16 Jan 2021 12:40:54 +0000 (14:40 +0200)]
imapc: Rename imapc_list_to_remote() to imapc_list_storage_to_remote_name()
Timo Sirainen [Thu, 14 Jan 2021 15:45:07 +0000 (17:45 +0200)]
lib-storage: mailbox_list_default_get_storage_name() - Escape ns_prefix/INBOX if possible
If storage_name_escape_char is set, escape the "I" letter in the
storage_name if the namespace also has inbox=yes. This way it's possible to
distinguish between the actual INBOX and ns_prefix/INBOX.
Timo Sirainen [Thu, 14 Jan 2021 15:33:13 +0000 (17:33 +0200)]
lib-storage: Update mailbox_list_settings.{vname|storage_name}_escape_char comments
Also add the examples in the comments to unit tests to make sure they really
work.
Timo Sirainen [Thu, 14 Jan 2021 15:27:03 +0000 (17:27 +0200)]
lib-storage: Fix mailbox name escape/unescape ordering
This fixes some cases like not properly escaping '/' in storage_name if it
was also the namespace separator. This also allows using the same character
for both vname_escape_char and storage_name_escape_char.
Timo Sirainen [Thu, 14 Jan 2021 15:07:34 +0000 (17:07 +0200)]
lib-storage: mailbox_list_default_get_vname() - Fix escaping namespace separator in storage_name
For example if { storage_name="foo/bar", storage_sep=".", ns_sep="/" }
the "/" in the name shouldn't be treated as a namespace separator.
If vname_escape_char is set, it should be returned escaped instead.
Timo Sirainen [Thu, 14 Jan 2021 14:38:04 +0000 (16:38 +0200)]
lib-storage: Use imap_escaped_utf8_to_utf7()
Timo Sirainen [Thu, 14 Jan 2021 14:32:25 +0000 (16:32 +0200)]
lib-storage: Use imap_escaped_utf8_hex_to_char()
Timo Sirainen [Thu, 14 Jan 2021 14:23:24 +0000 (16:23 +0200)]
lib-storage: Use mailbox_list_settings.vname_escape_char also with utf8 storage names
mailbox_list_default_get_storage_name() was already unescaping with utf8,
so mailbox_list_default_get_vname() should also be escaping with utf8.
Timo Sirainen [Thu, 14 Jan 2021 13:40:44 +0000 (15:40 +0200)]
lib-storage: mailbox_list_default_get_vname() - Use imap_utf7_to_utf8_escaped()
This changes the output a bit for broken mUTF7 names. Previously if any
part of the string had broken mUTF7 input, none of it was converted.
Now it's instead trying to convert as much as it can.
Timo Sirainen [Thu, 14 Jan 2021 13:09:34 +0000 (15:09 +0200)]
lib-storage: mailbox_list_default_get_vname() - Escape each hierarchical name separately
Same reasoning as for the similar change for
mailbox_list_default_get_storage_name().
Timo Sirainen [Thu, 14 Jan 2021 10:47:55 +0000 (12:47 +0200)]
lib-storage: Split off mailbox_list_storage_name_prepare()
Timo Sirainen [Thu, 14 Jan 2021 10:34:48 +0000 (12:34 +0200)]
lib-storage: mailbox_list_default_get_storage_name() - Escape each hierarchical name separately
This makes it possible in the following commits to allow unescaping to
write namespace hierarchy separator character without converting it into
the mailbox_list separator.
Timo Sirainen [Thu, 14 Jan 2021 10:30:54 +0000 (12:30 +0200)]
lib-storage: mailbox_list_default_get_storage_name() - Cleanup shared namespace root handling
Timo Sirainen [Thu, 14 Jan 2021 10:03:58 +0000 (12:03 +0200)]
lib-storage: Split off mailbox_list_vname_prepare()
This also slightly changes the code logic. mailbox_list_escape_name() is
now called also for INBOX, but that doesn't actually matter.
Timo Sirainen [Thu, 14 Jan 2021 13:22:20 +0000 (15:22 +0200)]
lib-storage: Remove mailbox_list_unescape_name() by moving its code inline
There was only a single caller for this function. It doesn't need to exist.
Timo Sirainen [Thu, 14 Jan 2021 13:20:13 +0000 (15:20 +0200)]
lib-storage: Remove mailbox_list_escape_name() by moving its code inline
There was only a single caller for this function. It doesn't need to exist.
Timo Sirainen [Wed, 13 Jan 2021 18:55:43 +0000 (20:55 +0200)]
lib-storage: Add unit tests for mailbox_list_default_get_{storage_name|vname}()
Timo Sirainen [Wed, 13 Jan 2021 16:50:38 +0000 (18:50 +0200)]
lib-storage: Rename mailbox_list_settings.broken_char to vname_escape_char
This clarifies that it's only used in vnames.
Timo Sirainen [Wed, 13 Jan 2021 16:47:11 +0000 (18:47 +0200)]
lib-storage: Rename mailbox_list_settings.escape_char to storage_name_escape_char
This clarifies that it's only used in storage_names.
Timo Sirainen [Wed, 13 Jan 2021 17:50:50 +0000 (19:50 +0200)]
lib-imap: Add imap_utf7_to_utf8_escaped() and imap_escaped_utf8_to_utf7()
These can be used to convert invalid mUTF-7 to escaped UTF-8 and back to the
original invalid input.
Timo Sirainen [Wed, 13 Jan 2021 17:48:15 +0000 (19:48 +0200)]
lib-imap: test-imap-utf7 - Simplify test_imap_utf7_non_utf16()
Timo Sirainen [Wed, 13 Jan 2021 17:19:37 +0000 (19:19 +0200)]
lib-imap: Move unnecessary shift check to mbase64_decode_to_utf8()
Timo Sirainen [Wed, 13 Jan 2021 17:17:18 +0000 (19:17 +0200)]
lib-imap: test-imap-utf7 - Improve/clarify testing '&'
& is never base64-encoded.
Aki Tuomi [Mon, 25 Jan 2021 11:32:18 +0000 (13:32 +0200)]
config: Add unit test for config parser
Aki Tuomi [Wed, 20 Jan 2021 08:07:56 +0000 (10:07 +0200)]
config: Extract sources to libconfig.la
Makes unit testing possible
Aki Tuomi [Tue, 19 Jan 2021 09:54:15 +0000 (11:54 +0200)]
lib-settings: test-settings - Add tests for settings file
Aki Tuomi [Mon, 18 Jan 2021 13:43:06 +0000 (15:43 +0200)]
test-settings-parser: Add test for size
Aki Tuomi [Mon, 18 Jan 2021 13:32:51 +0000 (15:32 +0200)]
lib-settings: test-settings-parser - Add test for settings parser
Aki Tuomi [Mon, 18 Jan 2021 12:11:28 +0000 (14:11 +0200)]
lib-settings: Add support for $ENV:name
Expands into given environment variable
Aki Tuomi [Wed, 22 Jan 2020 12:34:15 +0000 (14:34 +0200)]
config: Add support for $ENV:name
Expands into given environment variable
Aki Tuomi [Wed, 22 Jan 2020 12:33:38 +0000 (14:33 +0200)]
config: Expand multiple variables per line
Needed to properly support environment variables.
Aki Tuomi [Wed, 20 Jan 2021 08:49:23 +0000 (10:49 +0200)]
config: config-parser - Add config_write_keyvariable
Move code handling key variable expansion to separate function.
Simplifies next commit.
Josef 'Jeff' Sipek [Tue, 12 Jan 2021 18:53:19 +0000 (13:53 -0500)]
lib-storage: Make lua methods and functions use the passed in lua_State * directly
Josef 'Jeff' Sipek [Tue, 12 Jan 2021 19:27:31 +0000 (14:27 -0500)]
lib-storage: Make dlua_push_mail() take lua_State * directly
Josef 'Jeff' Sipek [Tue, 12 Jan 2021 19:26:07 +0000 (14:26 -0500)]
lib-storage: Make dlua_push_mail_user() take lua_State * directly