]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
4 years agolib-master, stats: Fix sending and parsing UPDATE commands release-2.3.13 2.3.13
Timo Sirainen [Tue, 22 Dec 2020 08:22:38 +0000 (10:22 +0200)] 
lib-master, stats: Fix sending and parsing UPDATE commands

These commands were parsed completely wrong, resulting in errors like:

Client sent invalid input for UPDATE: Invalid tv_created: Invalid timeval microseconds parameter

4 years agoNEWS: Add news for 2.3.13
Aki Tuomi [Sat, 12 Dec 2020 15:39:54 +0000 (17:39 +0200)] 
NEWS: Add news for 2.3.13

4 years agoNEWS: Add NEWS for 2.3.11.3
Aki Tuomi [Wed, 29 Jul 2020 08:28:50 +0000 (11:28 +0300)] 
NEWS: Add NEWS for 2.3.11.3

4 years agoNEWS: Add NEWS for 2.3.11.2
Aki Tuomi [Tue, 28 Jul 2020 08:02:06 +0000 (11:02 +0300)] 
NEWS: Add NEWS for 2.3.11.2

4 years agoNEWS: Add news for 2.3.11
Aki Tuomi [Tue, 30 Jun 2020 08:50:26 +0000 (11:50 +0300)] 
NEWS: Add news for 2.3.11

4 years agolib-storage: Fix potential assert-crash when fetching body snippet
Timo Sirainen [Mon, 30 Nov 2020 20:10:28 +0000 (22:10 +0200)] 
lib-storage: Fix potential assert-crash when fetching body snippet

This happened only in a rather special condition. Added unit test to
reproduce it.

Fixes:
Panic: file message-part-data.c: line 28 (message_part_data_is_plain_7bit): assertion failed: (data != NULL)

4 years agolib-storage: Fix potential assert-crash when adding missing attachment flags
Timo Sirainen [Mon, 30 Nov 2020 18:37:46 +0000 (20:37 +0200)] 
lib-storage: Fix potential assert-crash when adding missing attachment flags

This happened only in a rather special condition. Added unit test to
reproduce it.

Fixes:
Panic: file index-mail-headers.c: line 298 (index_mail_parse_header): assertion failed: (part != NULL)

4 years agolib-imap: Fix writing BODYSTRUCTURE for truncated multipart/digest part
Timo Sirainen [Wed, 18 Nov 2020 19:22:45 +0000 (21:22 +0200)] 
lib-imap: Fix writing BODYSTRUCTURE for truncated multipart/digest part

Fixes error while parsing BODYSTRUCTURE:
message_part message/rfc822 flag doesn't match lines in BODYSTRUCTURE

4 years agolib-imap: Fix writing BODYSTRUCTURE for truncated multipart/ part
Timo Sirainen [Wed, 18 Nov 2020 18:48:11 +0000 (20:48 +0200)] 
lib-imap: Fix writing BODYSTRUCTURE for truncated multipart/ part

If the max nesting limit is reached, write the last part out as
application/octet-stream. The original content-type could be confusing
IMAP clients when they don't see any child parts.

4 years agolib-imap: Fix writing BODYSTRUCTURE for truncated message/rfc822 part
Timo Sirainen [Wed, 18 Nov 2020 16:55:34 +0000 (18:55 +0200)] 
lib-imap: Fix writing BODYSTRUCTURE for truncated message/rfc822 part

If the max nesting limit is reached, write the last part out as
application/octet-stream instead of dummy message/rfc822.

Fixes error while parsing BODYSTRUCTURE:
message_part message/rfc822 flag doesn't match BODYSTRUCTURE

4 years agolib-http: http-client-request - Fix payload assertions in http_client_request_send_mo...
Stephan Bosch [Tue, 1 Dec 2020 09:25:09 +0000 (10:25 +0100)] 
lib-http: http-client-request - Fix payload assertions in http_client_request_send_more().

When the request payload is finished, both req->payload_input and
req->payload_output could be NULL, so the assertions on those being not NULL
need to happen after the check for req->payload_finished.

This particularly causes problems with the
blocking http_client_request_send/finish_payload() API, which constantly
modifies req->payload_input and sets it to NULL to finish the output.

This caused a panic:

Panic: file http-client-request.c: line 1232 (http_client_request_send_more): assertion failed: (req->payload_input != NULL)

4 years agolib-http: test-http-payload - Add test for blocking client output payload.
Stephan Bosch [Wed, 4 Apr 2018 13:18:51 +0000 (15:18 +0200)] 
lib-http: test-http-payload - Add test for blocking client output payload.

4 years agolib-http: test-http-payload - Implement reference counting for client request.
Stephan Bosch [Wed, 4 Apr 2018 01:02:24 +0000 (03:02 +0200)] 
lib-http: test-http-payload - Implement reference counting for client request.

4 years agolib-http: Reformat http-client-request.c.
Stephan Bosch [Sat, 27 Jun 2020 16:48:40 +0000 (18:48 +0200)] 
lib-http: Reformat http-client-request.c.

4 years agostats: openmetrics - Include submetric name only when present
Josef 'Jeff' Sipek [Mon, 19 Oct 2020 17:47:10 +0000 (13:47 -0400)] 
stats: openmetrics - Include submetric name only when present

Otherwise we SIGSEGV.

4 years agoimap: Fix potential hang if client disconnects with pipelined ambiguous commands
Timo Sirainen [Thu, 29 Oct 2020 10:55:21 +0000 (12:55 +0200)] 
imap: Fix potential hang if client disconnects with pipelined ambiguous commands

For example if client pipelines FETCH+LOGOUT commands and disconnects during
a large FETCH output, the LOGOUT command is processed as waiting for
unambiguity. This code path however doesn't detect a client disconnection,
and input IO handler is removed so it can't detect it either. So the imap
process hangs.

4 years agoimap: Move disconnected-check inside client_continue_pending_input()
Timo Sirainen [Thu, 29 Oct 2020 10:52:16 +0000 (12:52 +0200)] 
imap: Move disconnected-check inside client_continue_pending_input()

This way all of its callers don't have to check if the client is
disconnected.

4 years agodoveadm: mail: doveadm_mail_failed_error() - Set specific exit code for MAIL_ERROR_INUSE
Markus Valentin [Fri, 20 Nov 2020 11:52:47 +0000 (12:52 +0100)] 
doveadm: mail: doveadm_mail_failed_error() - Set specific exit code for MAIL_ERROR_INUSE

Set exit code DOVEADM_EX_NOTPOSSIBLE in case MAIL_ERROR_INUSE is set via
doveadm_mail_failed_error(). This exit code is used to indicate that a
operation cannot be done because another session prevents it.

4 years agodoveadm: When sending server logs to client, make sure ioloop isn't set to NULL
Timo Sirainen [Fri, 20 Nov 2020 10:15:18 +0000 (12:15 +0200)] 
doveadm: When sending server logs to client, make sure ioloop isn't set to NULL

This could have happened if there was any logging done outside command
handling. For example a doveadm command used http-client, which has a
timeout that triggers logging only after the command is finished.

Fixes segfault and:
Panic: file http-client.c: line 642 (http_client_context_close): assertion failed: (cctx->clients_list == NULL)

4 years agoimap: Fix memory leak in get_expunges_fallback()
sergey.kitov [Thu, 19 Nov 2020 20:07:37 +0000 (22:07 +0200)] 
imap: Fix memory leak in get_expunges_fallback()

4 years agolib: event-filter-parser - Test simple but invalid input
Josef 'Jeff' Sipek [Thu, 12 Nov 2020 19:15:54 +0000 (14:15 -0500)] 
lib: event-filter-parser - Test simple but invalid input

4 years agolib: event-filter - Do not assert that there in no output on error
Josef 'Jeff' Sipek [Thu, 12 Nov 2020 18:49:49 +0000 (13:49 -0500)] 
lib: event-filter - Do not assert that there in no output on error

When the input is a simple (but invalid) expression (e.g., a=b=c) the output
variable may be set.  This is perfectly fine.

The assertion (and the associated failure) come from when event filter
parsing was switched to the new filter syntax
(fcba1d530737813de11d9d730d5db6496e2e574b).

4 years agoconfigure.ac: Finish removing vpopmail support
Timo Sirainen [Wed, 11 Nov 2020 09:09:02 +0000 (11:09 +0200)] 
configure.ac: Finish removing vpopmail support

4 years agoauth: Remove ntlm mechanism & the LANMAN and NTLM password schemes
Josef 'Jeff' Sipek [Fri, 23 Oct 2020 20:24:09 +0000 (16:24 -0400)] 
auth: Remove ntlm mechanism & the LANMAN and NTLM password schemes

4 years agoauth: Remove vpopmail user & pass db support
Josef 'Jeff' Sipek [Fri, 16 Oct 2020 13:18:31 +0000 (09:18 -0400)] 
auth: Remove vpopmail user & pass db support

4 years agoauth: Remove S/Key mechanism & password scheme
Josef 'Jeff' Sipek [Fri, 16 Oct 2020 13:01:19 +0000 (09:01 -0400)] 
auth: Remove S/Key mechanism & password scheme

4 years agoauth: Remove RPA mechanism & password scheme
Josef 'Jeff' Sipek [Fri, 16 Oct 2020 12:50:21 +0000 (08:50 -0400)] 
auth: Remove RPA mechanism & password scheme

4 years agoauth: Remove postmap socket type
Josef 'Jeff' Sipek [Fri, 16 Oct 2020 12:31:34 +0000 (08:31 -0400)] 
auth: Remove postmap socket type

4 years agoauth: Remove support for SIA passdb
Josef 'Jeff' Sipek [Fri, 16 Oct 2020 12:28:12 +0000 (08:28 -0400)] 
auth: Remove support for SIA passdb

4 years agolib-storage: Add prefix to failed mailbox list index rebuild error messages
Timo Sirainen [Tue, 27 Oct 2020 13:12:19 +0000 (15:12 +0200)] 
lib-storage: Add prefix to failed mailbox list index rebuild error messages

This makes it clearer that the failure is happening because index was being
rebuilt.

4 years agolib-storage: Fix error message when mailbox list index rebuild fails
Timo Sirainen [Tue, 27 Oct 2020 13:13:39 +0000 (15:13 +0200)] 
lib-storage: Fix error message when mailbox list index rebuild fails

The error needs to be copied to mailbox_list, otherwise it's just
"Unknown internal list error".

4 years agolib-storage: Fix mailbox list iteration error handling for INBOX
Timo Sirainen [Tue, 27 Oct 2020 13:11:12 +0000 (15:11 +0200)] 
lib-storage: Fix mailbox list iteration error handling for INBOX

If INBOX isn't in the first namespace, the error wasn't correctly set for
it.

4 years agolib-storage: Use mailbox_get_last_mail_error() for mailbox_get_path_to() errors
Timo Sirainen [Tue, 27 Oct 2020 13:08:15 +0000 (15:08 +0200)] 
lib-storage: Use mailbox_get_last_mail_error() for mailbox_get_path_to() errors

mailbox_list_get_last_error() happens to work currently, but it's
accidental.

4 years agolib-index: Fix detecting if index is undeleted
Timo Sirainen [Mon, 2 Nov 2020 16:55:16 +0000 (18:55 +0200)] 
lib-index: Fix detecting if index is undeleted

It was possible that mail_index_is_deleted() kept returning that the index
was deleted, even if it was marked as undeleted. This happened when the
deletion was in dovecot.index.log.2, undeletion in dovecot.index.log and
dovecot.index pointed to the .log.2 file. This caused the .log file to be
read first, which sees the undeletion. Later on the .log.2 was parsed and
it marked the index back as deleted.

4 years agoimap: Improve imap-client-hibernate unit test
Timo Sirainen [Fri, 6 Nov 2020 15:07:35 +0000 (17:07 +0200)] 
imap: Improve imap-client-hibernate unit test

4 years agoimap: imap_client_hibernate() - Return reason string on failure
Timo Sirainen [Mon, 24 Aug 2020 16:10:43 +0000 (19:10 +0300)] 
imap: imap_client_hibernate() - Return reason string on failure

This helps writing a unit test for it.

4 years agoimap: Delay initializing client IO until client_create_finish()
Timo Sirainen [Mon, 24 Aug 2020 16:10:10 +0000 (19:10 +0300)] 
imap: Delay initializing client IO until client_create_finish()

This helps writing unit tests.

4 years agoimap: Fix crash if imap-hibernate socket can't be connected to
Timo Sirainen [Mon, 24 Aug 2020 13:58:16 +0000 (16:58 +0300)] 
imap: Fix crash if imap-hibernate socket can't be connected to

The error was supposed to be returned to caller, not logged directly.

4 years agolib-imap: Add imap_parser_client_read_tag()
Timo Sirainen [Mon, 17 Aug 2020 15:26:01 +0000 (18:26 +0300)] 
lib-imap: Add imap_parser_client_read_tag()

4 years agoimap-login: Use imap_parser_read_tag() and _read_command_name()
Timo Sirainen [Mon, 17 Aug 2020 15:22:42 +0000 (18:22 +0300)] 
imap-login: Use imap_parser_read_tag() and _read_command_name()

4 years agoimap-login: Split off client_invalid_command()
Timo Sirainen [Mon, 17 Aug 2020 15:15:35 +0000 (18:15 +0300)] 
imap-login: Split off client_invalid_command()

4 years agoimap: Use imap_parser_read_tag() and _read_command_name()
Timo Sirainen [Mon, 17 Aug 2020 15:11:36 +0000 (18:11 +0300)] 
imap: Use imap_parser_read_tag() and _read_command_name()

4 years agoimap: Split off client_command_failed_early()
Timo Sirainen [Mon, 17 Aug 2020 14:59:19 +0000 (17:59 +0300)] 
imap: Split off client_command_failed_early()

4 years agolib-imap: Add imap_parser_read_tag() and _read_command_name()
Timo Sirainen [Mon, 17 Aug 2020 14:32:11 +0000 (17:32 +0300)] 
lib-imap: Add imap_parser_read_tag() and _read_command_name()

4 years agolib: Be less verbose in event filter tests
Josef 'Jeff' Sipek [Fri, 23 Oct 2020 14:56:08 +0000 (10:56 -0400)] 
lib: Be less verbose in event filter tests

Only print the input string if the test failed.

4 years agolib-imap: Don't generate invalid BODYSTRUCTURE when reaching MIME part limit
Timo Sirainen [Fri, 11 Sep 2020 07:57:51 +0000 (10:57 +0300)] 
lib-imap: Don't generate invalid BODYSTRUCTURE when reaching MIME part limit

If the last MIME part was message/rfc822 and its child was truncated away,
BODYSTRUCTURE was missing the ENVELOPE and BODY[STRUCTURE] parts. Fixed by
writing empty dummy ones.

4 years agolib-mail: message-parser - Fix assert-crash when enforcing MIME part limit
Timo Sirainen [Fri, 11 Sep 2020 06:53:03 +0000 (09:53 +0300)] 
lib-mail: message-parser - Fix assert-crash when enforcing MIME part limit

The limit could have been exceeded with message/rfc822 parts.

4 years agoimap: Add unit test for imap-client-hibernate
Timo Sirainen [Mon, 24 Aug 2020 16:12:21 +0000 (19:12 +0300)] 
imap: Add unit test for imap-client-hibernate

4 years agoimap: Escape tag when sending it to imap-hibernate process
Timo Sirainen [Mon, 17 Aug 2020 15:33:20 +0000 (18:33 +0300)] 
imap: Escape tag when sending it to imap-hibernate process

4 years agoconfigure: Update version to 2.3.13
Aki Tuomi [Thu, 5 Nov 2020 14:02:39 +0000 (16:02 +0200)] 
configure: Update version to 2.3.13

4 years agolib-smtp: smtp-server-connection - Make sure output stream errors are handled.
Stephan Bosch [Tue, 27 Oct 2020 22:16:44 +0000 (23:16 +0100)] 
lib-smtp: smtp-server-connection - Make sure output stream errors are handled.

4 years agolib-ssl-iosteam: ostream-openssl - Make sure error on plaintext streams is propagated.
Stephan Bosch [Mon, 26 Oct 2020 09:19:46 +0000 (10:19 +0100)] 
lib-ssl-iosteam: ostream-openssl - Make sure error on plaintext streams is propagated.

4 years agolib-ssl-iostrea: ostream-openssl - Add local variable for ssl_io in o_stream_ssl_flus...
Stephan Bosch [Mon, 26 Oct 2020 21:04:53 +0000 (22:04 +0100)] 
lib-ssl-iostrea: ostream-openssl - Add local variable for ssl_io in o_stream_ssl_flush_buffer().

4 years agoauth: db-oauth2 - Do not allow empty active_value or active_attribute, when other...
Aki Tuomi [Thu, 5 Nov 2020 11:25:19 +0000 (13:25 +0200)] 
auth: db-oauth2 - Do not allow empty active_value or active_attribute, when other is set

4 years agoauth: db-oauth2 - If active attribute is present in request, check it
Aki Tuomi [Thu, 29 Oct 2020 09:37:22 +0000 (11:37 +0200)] 
auth: db-oauth2 - If active attribute is present in request, check it

If the attribute is missing, do not assume it's false.

4 years agoauth: db-oauth2 - Check active attribute by default
Aki Tuomi [Thu, 29 Oct 2020 09:36:00 +0000 (11:36 +0200)] 
auth: db-oauth2 - Check active attribute by default

4 years agoauth: db-oauth2 - Change active:false to mean invalid token
Aki Tuomi [Thu, 22 Oct 2020 08:42:23 +0000 (11:42 +0300)] 
auth: db-oauth2 - Change active:false to mean invalid token

Specifications say that invalid token, expired token and any other
reason why the token can be considered invalid should return
{"active":false} reply with no other fields.

Thus, we need to consider this as invalid token.

4 years agoauth: db-oauth2 - Allow active:false without username
Aki Tuomi [Thu, 22 Oct 2020 08:41:16 +0000 (11:41 +0300)] 
auth: db-oauth2 - Allow active:false without username

4 years agolib-storage: Skip setting log view in mailbox_get_expunges_init when box->view is...
sergey.kitov [Tue, 13 Oct 2020 14:34:12 +0000 (17:34 +0300)] 
lib-storage: Skip setting log view in mailbox_get_expunges_init when box->view is outdated.

This fixes assert-crash when IMAP client uses QRESYNC and lots of changes happen between syncing points.

Fixes:
Panic: file mail-transaction-log-view.c: line 144 (mail_transaction_log_view_set): assertion failed: (min_file_seq <= max_file_seq)

4 years agolib-fts: test-fts-filter - Fix clang suspicious concatenation of string literals...
Timo Sirainen [Thu, 29 Oct 2020 10:34:57 +0000 (12:34 +0200)] 
lib-fts: test-fts-filter - Fix clang suspicious concatenation of string literals warning

Fixes:
warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]

4 years agolib: Standardize STMT_BEGIN and STMT_END
Timo Sirainen [Thu, 29 Oct 2020 10:33:14 +0000 (12:33 +0200)] 
lib: Standardize STMT_BEGIN and STMT_END

do .. while(0) should work everywhere.

This also fixes warnings given by new clang:
warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]

4 years agolib: test-istream - Don't try to return void
Timo Sirainen [Thu, 29 Oct 2020 10:32:44 +0000 (12:32 +0200)] 
lib: test-istream - Don't try to return void

4 years agolib: test-file-cache - Add asserts for initial return value of file_cache_get
Aki Tuomi [Wed, 28 Oct 2020 10:45:09 +0000 (12:45 +0200)] 
lib: test-file-cache - Add asserts for initial return value of file_cache_get

4 years agolib-lda: Update mail sizes to event only if they are known
Aki Tuomi [Wed, 28 Oct 2020 10:23:40 +0000 (12:23 +0200)] 
lib-lda: Update mail sizes to event only if they are known

4 years agolib-storage: raw-mail - Cast st_size to uoff_t
Aki Tuomi [Wed, 28 Oct 2020 10:22:58 +0000 (12:22 +0200)] 
lib-storage: raw-mail - Cast st_size to uoff_t

mbox->size is unsigned field, and st_size will be -1
is the stat target is not regular file or symbolic link.
This can happen if it's stream like stdin.

4 years agolib-fs: iteration - Fix crash when overwriting iteration error
Timo Sirainen [Fri, 23 Oct 2020 11:54:22 +0000 (14:54 +0300)] 
lib-fs: iteration - Fix crash when overwriting iteration error

Can't use fs_file_path() because file is NULL. Instead, add the path to
struct fs_iter directly so it can be used in the error.

Broken by eaaf40ca4e8994824abff89fc617c3cc737d83a5

4 years agoquota: Avoid implicit integer conversion to unsigned in quota calculation
Aki Tuomi [Thu, 22 Oct 2020 17:21:41 +0000 (20:21 +0300)] 
quota: Avoid implicit integer conversion to unsigned in quota calculation

Deducting negative number from unsigned integer causes
signed integer conversion to unsigned int, which results a
too large positive number. Do calculations using int64 instead.

This did not cause any visible problems, found by
clang integer sanitization.

4 years agoglobal: Fix overzealous use of ENUM_NEGATE
Aki Tuomi [Thu, 22 Oct 2020 15:53:34 +0000 (18:53 +0300)] 
global: Fix overzealous use of ENUM_NEGATE

4 years agolib: istream-seekable - Fix returning stream size
Timo Sirainen [Thu, 22 Oct 2020 19:46:35 +0000 (22:46 +0300)] 
lib: istream-seekable - Fix returning stream size

The returned size may have been truncated.

4 years agolib-fs: Add assert to make sure we never log "(null)" as the old error
Timo Sirainen [Fri, 16 Oct 2020 08:21:51 +0000 (11:21 +0300)] 
lib-fs: Add assert to make sure we never log "(null)" as the old error

4 years agolib-fs: Fix logging old error when an unlogged error is replaced by new error
Timo Sirainen [Fri, 16 Oct 2020 08:20:04 +0000 (11:20 +0300)] 
lib-fs: Fix logging old error when an unlogged error is replaced by new error

The old error was logged as "(null)" if the error happened in a non-root
(filter) file.

4 years agolib-fs: Include file's path when logging pending error messages
Timo Sirainen [Fri, 16 Oct 2020 07:19:59 +0000 (10:19 +0300)] 
lib-fs: Include file's path when logging pending error messages

Otherwise it may not be known which file the error is about.

This happens when a file is freed without the last error being logged.
Also when an unlogged error is being replaced with a new error.

4 years agolib: event-filter-parser - Disallow non-equals comparators on non-fields
Josef 'Jeff' Sipek [Thu, 24 Sep 2020 17:44:58 +0000 (13:44 -0400)] 
lib: event-filter-parser - Disallow non-equals comparators on non-fields

Non-equals comparisons (<, <=, >, and >=) aren't well defined for anything
other than fields.  Therefore, if we encounter one of these comparators with
an event name, category name, or source location, we should error out and
avoid confusing the user.

4 years agolib-storage: Delay recreating event when closing mail
Timo Sirainen [Thu, 15 Oct 2020 17:34:05 +0000 (20:34 +0300)] 
lib-storage: Delay recreating event when closing mail

If the mail isn't reused, the event is unnecessary.

4 years agoglobal: Explicitly wrap values to fit target
Aki Tuomi [Mon, 19 Oct 2020 10:49:29 +0000 (13:49 +0300)] 
global: Explicitly wrap values to fit target

4 years agoglobal: Add explicit casts where needed
Aki Tuomi [Tue, 1 Sep 2020 06:44:04 +0000 (09:44 +0300)] 
global: Add explicit casts where needed

Squash implicit conversion complains from sanitizer.

4 years agoglobal: Disable undefined behaviour sanitization for select locations
Aki Tuomi [Thu, 13 Aug 2020 08:36:08 +0000 (11:36 +0300)] 
global: Disable undefined behaviour sanitization for select locations

4 years agoglobal: Fix negation with constants to match target type
Aki Tuomi [Thu, 20 Aug 2020 05:39:26 +0000 (08:39 +0300)] 
global: Fix negation with constants to match target type

4 years agoglobal: Use ENUM_NEGATE() macro where necessary
Aki Tuomi [Thu, 20 Aug 2020 05:35:59 +0000 (08:35 +0300)] 
global: Use ENUM_NEGATE() macro where necessary

4 years agoglobal: Use UOFF_T_MAX instead of (uoff_t)-1
Aki Tuomi [Wed, 23 Sep 2020 11:51:53 +0000 (14:51 +0300)] 
global: Use UOFF_T_MAX instead of (uoff_t)-1

4 years agoglobal: Use SIZE_MAX instead of (size_t)-1
Aki Tuomi [Wed, 23 Sep 2020 11:43:29 +0000 (14:43 +0300)] 
global: Use SIZE_MAX instead of (size_t)-1

4 years agolib: macros - Add ENUM_NEGATE
Aki Tuomi [Tue, 11 Aug 2020 05:41:54 +0000 (08:41 +0300)] 
lib: macros - Add ENUM_NEGATE

Handles enumeration flag negation.

4 years agoconfigure: Add ubsan support
Aki Tuomi [Tue, 28 Jul 2020 10:42:01 +0000 (13:42 +0300)] 
configure: Add ubsan support

4 years agolib-mail: test-message-header-hash: Fix type issue
Aki Tuomi [Wed, 23 Sep 2020 11:39:36 +0000 (14:39 +0300)] 
lib-mail: test-message-header-hash: Fix type issue

Satisfies runtime analyzer.

4 years agodoveadm: mailbox status - Handle first_save_date correctly
Aki Tuomi [Tue, 22 Sep 2020 11:39:41 +0000 (14:39 +0300)] 
doveadm: mailbox status - Handle first_save_date correctly

If first_save_date is -1 it means no save has been done.

4 years agolib: unichar - Change uni_utf8_char_bytes to accept unsigned char
Aki Tuomi [Thu, 20 Aug 2020 05:57:35 +0000 (08:57 +0300)] 
lib: unichar - Change uni_utf8_char_bytes to accept unsigned char

4 years agolib-index: Use SIZE_MAX with str_sanitize
Aki Tuomi [Tue, 1 Sep 2020 06:57:04 +0000 (09:57 +0300)] 
lib-index: Use SIZE_MAX with str_sanitize

4 years agoauth: password-scheme - Use UINT_MAX when calling password_generate_otp
Aki Tuomi [Tue, 1 Sep 2020 06:57:23 +0000 (09:57 +0300)] 
auth: password-scheme - Use UINT_MAX when calling password_generate_otp

4 years agolib: mempool-allocfree - Do not use PTR_OFFSET with negative offset
Aki Tuomi [Tue, 1 Sep 2020 08:54:50 +0000 (11:54 +0300)] 
lib: mempool-allocfree - Do not use PTR_OFFSET with negative offset

Avoids undefined behaviour sanitization error.

4 years agolib-fts: test-fts-tokenizer - Change test_chars to unsigned char
Aki Tuomi [Tue, 1 Sep 2020 08:56:42 +0000 (11:56 +0300)] 
lib-fts: test-fts-tokenizer - Change test_chars to unsigned char

4 years agolib: str - Ensure str_append_c gets unsigned char parameter
Aki Tuomi [Thu, 20 Aug 2020 06:46:24 +0000 (09:46 +0300)] 
lib: str - Ensure str_append_c gets unsigned char parameter

4 years agolib: seq-range-array - Assert-crash if array becomes 0..(uint32_t)-1
Timo Sirainen [Thu, 1 Oct 2020 08:37:24 +0000 (11:37 +0300)] 
lib: seq-range-array - Assert-crash if array becomes 0..(uint32_t)-1

4 years agolib: seq_range_array_add() - Reorder code flow
Timo Sirainen [Thu, 1 Oct 2020 08:19:33 +0000 (11:19 +0300)] 
lib: seq_range_array_add() - Reorder code flow

4 years agolib: seq-range-array - Split off seq_range_array_add_slow_path()
Timo Sirainen [Thu, 1 Oct 2020 08:18:04 +0000 (11:18 +0300)] 
lib: seq-range-array - Split off seq_range_array_add_slow_path()

4 years agolib: seq-range-array - Use seq_range_length() internally
Timo Sirainen [Thu, 1 Oct 2020 08:04:56 +0000 (11:04 +0300)] 
lib: seq-range-array - Use seq_range_length() internally

4 years agolib: seq_range_length() - Use const pointer
Timo Sirainen [Thu, 1 Oct 2020 08:04:36 +0000 (11:04 +0300)] 
lib: seq_range_length() - Use const pointer

4 years agodoc: Include dovecot-oauth2.conf.ext in dist tarball
Martti Rannanjärvi [Tue, 20 Oct 2020 12:02:24 +0000 (15:02 +0300)] 
doc: Include dovecot-oauth2.conf.ext in dist tarball

4 years agodoveadm-server: Fix STARTTLS support.
Stephan Bosch [Mon, 12 Oct 2020 21:29:02 +0000 (23:29 +0200)] 
doveadm-server: Fix STARTTLS support.

4 years agolib-master: master-service-ssl - Make context initialization error more useful.
Stephan Bosch [Tue, 13 Oct 2020 20:56:25 +0000 (22:56 +0200)] 
lib-master: master-service-ssl - Make context initialization error more useful.

This improves the error in case SSL is disabled; other causes still yield a
rather unhelpful error message.

4 years agolib: ostream-multiplex - Fix dead assignment by adding an assertion on the result.
Stephan Bosch [Mon, 12 Oct 2020 21:18:09 +0000 (23:18 +0200)] 
lib: ostream-multiplex - Fix dead assignment by adding an assertion on the result.

Found by Clang scan-build.