]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Wed, 9 Jun 2021 20:45:51 +0000 (23:45 +0300)]
doveadm exec: Convert to v2 command
Timo Sirainen [Thu, 10 Jun 2021 11:23:46 +0000 (14:23 +0300)]
doveadm: Add CMD_FLAG_NO_UNORDERED_OPTIONS
Timo Sirainen [Wed, 9 Jun 2021 20:44:29 +0000 (23:44 +0300)]
doveadm: Add CMD_FLAG_NO_OPTIONS
This allows command to process all parameters, including parameters starting
with "-".
Timo Sirainen [Wed, 9 Jun 2021 20:39:54 +0000 (23:39 +0300)]
doveadm: Split off doveadm_cmd_process_options()
Timo Sirainen [Wed, 9 Jun 2021 20:37:19 +0000 (23:37 +0300)]
doveadm: Reformat doveadm-cmd.c
Timo Sirainen [Wed, 9 Jun 2021 20:21:27 +0000 (23:21 +0300)]
doveadm help: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 20:13:30 +0000 (23:13 +0300)]
doveadm dump: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 20:10:08 +0000 (23:10 +0300)]
doveadm dump: Change doveadm_cmd_dump.cmd() API to be simpler
Timo Sirainen [Wed, 9 Jun 2021 20:02:36 +0000 (23:02 +0300)]
doveadm pw: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 19:55:55 +0000 (22:55 +0300)]
doveadm mailbox mutf7: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 19:47:35 +0000 (22:47 +0300)]
doveadm sis deduplicate/find: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 19:42:54 +0000 (22:42 +0300)]
doveadm zlibconnect: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 19:39:55 +0000 (22:39 +0300)]
doveadm: Code cleanup - Add doveadm_cmdline_commands_ver2[]
Timo Sirainen [Thu, 10 Jun 2021 13:56:06 +0000 (16:56 +0300)]
doveadm: Support building ARRAY type mail command parameters
Timo Sirainen [Thu, 10 Jun 2021 13:55:04 +0000 (16:55 +0300)]
doveadm: Fix building IP/INT64 type mail command parameters
Timo Sirainen [Thu, 10 Jun 2021 13:51:58 +0000 (16:51 +0300)]
doveadm: Split off doveadm_cmd_parse_arg()
Timo Sirainen [Thu, 3 Dec 2020 17:20:32 +0000 (19:20 +0200)]
lib: Fix assert-crash when destroying ioloop that has active context
Normally the ioloop shouldn't have an active context at deinit, but it
seems to be possible in some situations. It's not really bad anyway, so
just allow it.
Fixes:
Panic: file ioloop.c: line 928 (io_loop_destroy): assertion failed: (ioloop->cur_ctx == NULL)
Timo Sirainen [Mon, 19 Jul 2021 11:56:47 +0000 (14:56 +0300)]
lib-mail: Fix memory leak in istream-header-filter
Broken by
1c1b77dbf9a548aac788efb76973ce2d0fa6c732
Timo Sirainen [Mon, 19 Jul 2021 10:54:24 +0000 (13:54 +0300)]
lib: data-stack - t_try_realloc() - Add missing data_stack_last_buffer_reset() call
This fixes incorrect "buffer overflow" panics with DEBUG builds.
Timo Sirainen [Mon, 19 Jul 2021 10:52:58 +0000 (13:52 +0300)]
lib: data-stack - data_stack_last_buffer_reset(() - Add comments and an assert
This clarifies how the function is expected to work.
Markus Valentin [Mon, 12 Jul 2021 12:26:38 +0000 (14:26 +0200)]
lib-storage: Use escaped name length to calculate truncation margin
This fixes corruption of mailbox names when the storage_name_escape_char
has been part of the parent folder name.
Broken by
5dd81d83d8d9120ed2a74d5bd2aa62622885b49c
Aki Tuomi [Mon, 12 Jul 2021 10:40:58 +0000 (13:40 +0300)]
lib-lua: Fix LIBDICT_LUA variable usage
It needs to be appended to, not set again. Broken by
3d0b7e9bb59e3dc41fd5a4d09832eedea7a92933 .
Aki Tuomi [Thu, 8 Jul 2021 09:24:47 +0000 (12:24 +0300)]
lib-lua: Only link libdict_lua if it's available
Aki Tuomi [Thu, 8 Jul 2021 08:10:38 +0000 (11:10 +0300)]
plugins/fts: Restore fts_indexer_cmd
It was removed in
cf114f90e0ba25c18db846ee582e3a130bd52949 and that
broke some FTS plugins.
Timo Sirainen [Tue, 22 Jun 2021 11:28:34 +0000 (13:28 +0200)]
lib-dict: Fix linking when building without Lua
Linking didn't work on some non-Linux OSes (non-GNU linkers?)
Timo Sirainen [Fri, 4 Jun 2021 08:16:53 +0000 (11:16 +0300)]
lib-compression: istream-zstd - Make sure parent stream error isn't overwritten
This could have happened if the parent istream failed before the zstd header
was read. Practically this didn't happen currently, because the initial
parent stream error was normally already handled by istream-decompress
before istream-zstd was even called.
Timo Sirainen [Fri, 4 Jun 2021 08:16:22 +0000 (11:16 +0300)]
lib-compression: istream-zlib - Fix parent stream error handling near EOF
This happened when gz stream (including trailer) was fully read, but the
final check to see if there is a concatenated gz stream afterwards failed
due to parent istream failure. In this case the error was ignored and
istream returned success, truncating any potential concatenated istream
input. This situation was very unlikely to happen.
Timo Sirainen [Thu, 27 May 2021 16:34:50 +0000 (19:34 +0300)]
lib-mail: Fix istream-header-filter snapshotting
Timo Sirainen [Thu, 17 Jun 2021 16:55:56 +0000 (19:55 +0300)]
lib: Add istream_snapshot.free() to allow more complex snapshots
Markus Valentin [Tue, 15 Jun 2021 10:21:22 +0000 (12:21 +0200)]
lib-storage: Make use of MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX
Markus Valentin [Tue, 15 Jun 2021 10:19:00 +0000 (12:19 +0200)]
lib-index: Introduce MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX
This flag is used to make sure secondary views flags-index can work
properly without emitting warnings about inconsistency. If an
inconsistency is encountered fix it by fully syncing.
Markus Valentin [Tue, 15 Jun 2021 06:59:17 +0000 (08:59 +0200)]
Revert "lib-storage: Always fix inconsistency when syncing private flags index"
This reverts commit
986d9cbbecffd836d977b6ad956b04e3ca606677 .
This is reverted because storing flags on private indexes no longer send
untagged replies.
Markus Valentin [Thu, 1 Jul 2021 08:46:05 +0000 (10:46 +0200)]
acl: Ignore acls in acl_lookup_dict_rebuild_add_backend if ignore_acls is set
In case an namespace has been configured to ignore ACLs also respect
that when acl_lookup_dict_rebuild is called.
Co-Authored-By: Vincent Brillault <vincent.brillault@cern.ch>
Stephan Bosch [Tue, 1 Jun 2021 22:40:19 +0000 (00:40 +0200)]
lib-smtp: test-smtp-payload - Set all timeouts to CLIENT_PROGRESS_TIMEOUT.
This prevents connect and idle timeouts from triggering earlier than the
progress timeout.
Michael M Slusarz [Tue, 22 Jun 2021 17:52:02 +0000 (11:52 -0600)]
imap: PREVIEW responses need trailing space
2.3.15 regression
Before 2.3.15, there was this same buggy behavior in error cases; 2.3.15
moved that buggy behavior to the success code path
DOP-2463
Timo Sirainen [Mon, 14 Jun 2021 20:46:48 +0000 (23:46 +0300)]
doveadm-server: Add log prefix to logs written to client
Timo Sirainen [Mon, 14 Jun 2021 20:43:11 +0000 (23:43 +0300)]
doveadm-server: Simplify writing log output to client
Timo Sirainen [Mon, 14 Jun 2021 18:14:13 +0000 (20:14 +0200)]
lib: Fix log prefix in internal handler when log handler has been overridden
Adds back mail_log_prefix to doveadm mail commands when doveadm-server was
accessed via TCP.
Originally broken by
c9dd53f7180a78668cbc1e6eb34d5b1722beccb9
Siavash Tavakoli [Fri, 4 Jun 2021 22:00:21 +0000 (23:00 +0100)]
dict-file: Make sure home_dir doesn't change during operations
file_dict is initialized for a specific user. Keep record of the user's
home_dir and check for all dict operations that the user did not change.
Siavash Tavakoli [Wed, 2 Jun 2021 15:17:22 +0000 (16:17 +0100)]
global: Remove dict_settings.home_dir
Allows dict to be shared across users. Dict operations use
dict_op_settings.home_dir if set.
Siavash Tavakoli [Wed, 26 May 2021 14:18:20 +0000 (15:18 +0100)]
dict: Split protocol command arguments in dict_command_input()
Instead of duplicating code and splitting in each command functions
separately.
Siavash Tavakoli [Wed, 26 May 2021 00:41:51 +0000 (01:41 +0100)]
lib-dict: Make sure username is valid as well when checking key prefix
If this is a private key, username must be non-empty.
Siavash Tavakoli [Mon, 24 May 2021 11:54:58 +0000 (12:54 +0100)]
dict: Remove dict_connection.username and dict_settings.username
- dict should be user agnostic. dict operations have username.
- same for dict connection
- also removes username from dict process' log prefix
Siavash Tavakoli [Thu, 3 Jun 2021 18:59:23 +0000 (19:59 +0100)]
dict: Add username field for command events
To prepare for connection username removal in next commit. Instead of
adding username field for the parent event, add it in command events.
Commands can now be run for different users. Having the same username
field as the one used in initialization can be wrong.
Siavash Tavakoli [Mon, 24 May 2021 10:47:15 +0000 (11:47 +0100)]
dict-client: Do not send username in initial handshake
Dict commands that need username have it included in their arguments now.
Siavash Tavakoli [Mon, 24 May 2021 10:58:44 +0000 (11:58 +0100)]
dict-fs: Remove unused fs_dict.username
Siavash Tavakoli [Mon, 24 May 2021 10:58:02 +0000 (11:58 +0100)]
dict-redis: Remove unused redis_dict.username
Siavash Tavakoli [Mon, 24 May 2021 10:57:18 +0000 (11:57 +0100)]
dict-memcached-ascii: Remove unused memcached_ascii_dict.username
Siavash Tavakoli [Mon, 24 May 2021 10:56:29 +0000 (11:56 +0100)]
dict-sql: Remove unused sql_dict.username
Siavash Tavakoli [Mon, 24 May 2021 10:54:56 +0000 (11:54 +0100)]
dict-ldap: Remove unused ldap_dict.username
Siavash Tavakoli [Thu, 3 Jun 2021 20:27:31 +0000 (21:27 +0100)]
dict: Add dict_event_create
Helper function for dict events. If dict_op_settings has username set, adds
it as a field.
Siavash Tavakoli [Thu, 3 Jun 2021 20:18:03 +0000 (21:18 +0100)]
dict-client: Send username in commands
Lookup, iterate_begin, and transaction_begin need username. This bumps
dict protocol's major version to 3.
Siavash Tavakoli [Thu, 3 Jun 2021 20:16:22 +0000 (21:16 +0100)]
dict-redis: Use dict_op_settings to get full key
Switch from dict.username to dict_op_settings.username. Also, ensure
that username is escaped.
Siavash Tavakoli [Thu, 3 Jun 2021 20:14:51 +0000 (21:14 +0100)]
dict-memcached-ascii: Use dict_op_settings to get full key
Switch from dict.username to dict_op_settings.username.
Siavash Tavakoli [Thu, 3 Jun 2021 20:12:27 +0000 (21:12 +0100)]
dict-fs: Use dict_op_settings to get full key
Switch from dict.username to dict_op_settings.username.
Siavash Tavakoli [Thu, 3 Jun 2021 19:58:05 +0000 (20:58 +0100)]
dict: Use dict_op_settings in backends
- Use dict_op_settings in dict API functions
- forward the settings object to backends for dict lookup/iterate
- Update backends to use dict_op_settings
Siavash Tavakoli [Thu, 3 Jun 2021 17:31:57 +0000 (18:31 +0100)]
notify-status: Initialize dict_op_settings for dict operations
Siavash Tavakoli [Thu, 3 Jun 2021 17:32:50 +0000 (18:32 +0100)]
last-login: Initialize dict_op_settings for dict operations
Siavash Tavakoli [Thu, 3 Jun 2021 17:30:17 +0000 (18:30 +0100)]
quota: Initialize dict_op_settings for dict operations
Siavash Tavakoli [Thu, 3 Jun 2021 18:32:26 +0000 (19:32 +0100)]
dict: Initialize dict_op_settings for dict operations
Siavash Tavakoli [Thu, 3 Jun 2021 17:33:21 +0000 (18:33 +0100)]
acl: Initialize dict_op_settings for dict lookup
Siavash Tavakoli [Thu, 3 Jun 2021 17:34:26 +0000 (18:34 +0100)]
lib-oauth2: Initialize dict_op_settings for dict operations
Siavash Tavakoli [Thu, 3 Jun 2021 17:41:14 +0000 (18:41 +0100)]
lib-dict: lua: Initialize dict_op_settings for dict operations
- Add new mandatory argument for lookup, set, and transaction_begin.
- Use the username to initialize dict_op_settings passed to lib-dict API
Siavash Tavakoli [Thu, 1 Jul 2021 19:39:41 +0000 (20:39 +0100)]
lib-dict-extra: test-dict-fs: Initialize dict_op_settings for dict operations
Siavash Tavakoli [Thu, 3 Jun 2021 17:39:39 +0000 (18:39 +0100)]
lib-dict-backend: test-dict-sql: Initialize dict_op_settings for dict operations
Siavash Tavakoli [Thu, 3 Jun 2021 17:38:50 +0000 (18:38 +0100)]
lib-dict: test-dict-client: Initialize dict_op_settings for dict operations
Siavash Tavakoli [Thu, 3 Jun 2021 17:36:04 +0000 (18:36 +0100)]
lib-storage: Initialize dict_op_settings for dict operations
Siavash Tavakoli [Thu, 3 Jun 2021 17:35:28 +0000 (18:35 +0100)]
lib-fs: Initialize dict_op_settings for dict operations
Siavash Tavakoli [Thu, 3 Jun 2021 17:13:31 +0000 (18:13 +0100)]
auth: userdb-dict: Initialize dict_op_settings for dict iterate
Siavash Tavakoli [Thu, 3 Jun 2021 17:11:47 +0000 (18:11 +0100)]
auth: db-dict: Initialize dict_op_settings for dict lookup
Siavash Tavakoli [Thu, 3 Jun 2021 11:53:08 +0000 (12:53 +0100)]
doveadm dict: Initialize & use dict_op_settings for dict commands
Sets the username in cmd_dict_init_full and use the settings struct for dict
operations.
Siavash Tavakoli [Wed, 2 Jun 2021 23:06:44 +0000 (00:06 +0100)]
lib-storage: Add mail_user.dict_op_set and mail_user_get_dict_op_settings()
Used to initialize or obtain dict_op_settings for the user.
Siavash Tavakoli [Fri, 4 Jun 2021 14:39:05 +0000 (15:39 +0100)]
lib-storage: mail-user: Clarify mail_user_get_home() usage string
Explicitly comment about returned string lifetime.
Siavash Tavakoli [Tue, 18 May 2021 16:52:55 +0000 (17:52 +0100)]
dict: Optionally accept username in lookup/iterate/begin dict protocol commands
Only an optional field, don't actually use it.
Siavash Tavakoli [Fri, 28 May 2021 10:57:39 +0000 (11:57 +0100)]
dict-file: Remove file_dict_iterate_path struct
No need for the struct since support for multi-path iterate is removed.
So path and path length can be merged with file_dict_iterate_context.
Siavash Tavakoli [Wed, 26 May 2021 12:47:50 +0000 (13:47 +0100)]
dict backends: Remove multi-path handling code in dict iteration
With mutli-path iteration support being dropped from dict protocol, these
can be cleaned up.
Siavash Tavakoli [Wed, 26 May 2021 11:15:06 +0000 (12:15 +0100)]
dict: Drop support for multi-path iteration in dict protocol
Remove dict_iterate_init_multiple() since it is not used anywhere. Also
drop support in dict protocol to read multiple paths.
Siavash Tavakoli [Tue, 18 May 2021 00:50:03 +0000 (01:50 +0100)]
lib-dict: Add dict_op_settings_dup() and dict_op_settings_private_free()
- dict_op_settings_dup() creates a copy of dict_op_settings into a new
struct dict_dop_settings_private.
- dict_op_settings_private_free() frees the memory for copied object.
Siavash Tavakoli [Mon, 3 May 2021 14:09:49 +0000 (15:09 +0100)]
lib-dict: Add dict_op_settings parameter for dict_iterate_init()
Only adds the parameter, doesn't use it.
Siavash Tavakoli [Mon, 3 May 2021 14:09:01 +0000 (15:09 +0100)]
lib-dict: Add dict_op_settings parameter for dict_transaction_begin()
Only adds the parameter, doesn't use it.
Siavash Tavakoli [Mon, 3 May 2021 12:42:56 +0000 (13:42 +0100)]
lib-dict: Add dict_op_settings
Used for dict operations. Currently username & home_dir are used. Also, change
dict_lookup() to accept a parameter of this type but don't actually use it.
Siavash Tavakoli [Mon, 3 May 2021 11:15:54 +0000 (12:15 +0100)]
lib-dict: Remove dict_settings.value_type
It was originally added to dict-db and no other backend uses it. With dict-db
removed, there is no need to keep it.
Siavash Tavakoli [Wed, 12 May 2021 11:54:30 +0000 (12:54 +0100)]
dict-client: Escape username and dict uri in handshake HELLO message
Siavash Tavakoli [Fri, 30 Apr 2021 13:42:46 +0000 (14:42 +0100)]
lib-dict-backen: Drop unused dict-db
Josef 'Jeff' Sipek [Thu, 24 Jun 2021 16:56:05 +0000 (12:56 -0400)]
virtual: Expunge old emails if backend box uidvalidity changed
Timo Sirainen [Mon, 14 Jun 2021 20:28:48 +0000 (23:28 +0300)]
doveadm-server: Don't return two error lines if a command fails
This normally didn't affect doveadm client usage, but it did break reply
matching when multiple usernames were handled by a single command (e.g.
wildcard users).
Timo Sirainen [Thu, 10 Dec 2020 08:44:42 +0000 (10:44 +0200)]
lib-http: test-http-client-errors - Don't rely on sleeps
Use the notification signal API instead. Also it's only one test (group)
that needs to do this.
Timo Sirainen [Fri, 18 Jun 2021 11:19:36 +0000 (14:19 +0300)]
lib-test: Add notification signal send/wait API
This allows a simple way for child/parent processes to communicate when
they're ready. SIGHUP signal is reserved for this.
Timo Sirainen [Thu, 10 Dec 2020 08:54:25 +0000 (10:54 +0200)]
doveadm batch: Fix assert-crash that happened when it was attempted to be used
Fixes:
Panic: file mail-storage.c: line 1067 (mailbox_set_reason): assertion failed: (reason != NULL)
Markus Valentin [Fri, 25 Jun 2021 12:52:11 +0000 (14:52 +0200)]
lib-fs: metawrap - Fix handling empty file
As empty files are already closed when fs-metawrap attempts to append
metadata there have been problems with size calculation. Fix this by
relying on the same mechanism as if metadata changed during write.
This recreates metadata and keeps old body. This fixes an issue when
writing empty mails to cache (failed: Cached message size larger than
expected).
This was introduced by
03e102ddccaae9e944c503d4269de755731798e8a
Markus Valentin [Fri, 25 Jun 2021 12:28:57 +0000 (14:28 +0200)]
lib-fs: fs-metawrap - Expect fs_stat to return size 0 for empty file
Timo Sirainen [Mon, 14 Jun 2021 09:47:15 +0000 (12:47 +0300)]
NEWS: Updates for v2.3.15
Aki Tuomi [Mon, 24 May 2021 11:03:57 +0000 (14:03 +0300)]
NEWS: Add news for 2.3.14.1
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.
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
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