]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
5 years agoReleased v2.3.11.3 release-2.3.11 2.3.11.3
Aki Tuomi [Wed, 29 Jul 2020 08:29:12 +0000 (11:29 +0300)] 
Released v2.3.11.3

5 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

5 years agopop3: Fix assert-crash when using pop3_deleted_flag
Timo Sirainen [Wed, 29 Jul 2020 07:40:17 +0000 (10:40 +0300)] 
pop3: Fix assert-crash when using pop3_deleted_flag

Broken by 6d18044e1408ce98aa8ef145a9f85895829a7bc7

Fixes:
Panic: file seq-range-array.c: line 472 (seq_range_array_invert): assertion failed: (range[count-1].seq2 <= max_seq)

5 years agopop3-login: Fix handling commands that are sent in multiple IP packets
Timo Sirainen [Wed, 15 Jul 2020 09:42:59 +0000 (12:42 +0300)] 
pop3-login: Fix handling commands that are sent in multiple IP packets

This happened especially if the commands were long, like XCLIENT.

This got broken by recent pop3-login changes.

5 years agoReleased v2.3.11.2
Aki Tuomi [Tue, 28 Jul 2020 10:25:44 +0000 (13:25 +0300)] 
Released v2.3.11.2

5 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

5 years agolib-test: Rename s1, s2 to _temp_s1, _temp_s2 in test_assert_strcmp_idx
Aki Tuomi [Fri, 10 Jul 2020 08:00:14 +0000 (11:00 +0300)] 
lib-test: Rename s1, s2 to _temp_s1, _temp_s2 in test_assert_strcmp_idx

Some test code uses s1 and s2 as variable names.

Broken in 449539dc52070bebde3ae7babe96e6e272dd7101

5 years agopop3-login: Use struct client authenticating member
Aki Tuomi [Thu, 9 Jul 2020 06:38:37 +0000 (09:38 +0300)] 
pop3-login: Use struct client authenticating member

This is what should be used instead of introducing our own.

Broken in 6c55437036b3de11804eb68f66d84cb164c33d63

5 years agopop3-login: Consume line after mech probe
Aki Tuomi [Thu, 9 Jul 2020 06:39:48 +0000 (09:39 +0300)] 
pop3-login: Consume line after mech probe

Otherwise we read next line empty and that causes -ERR.

Broken in 6c55437036b3de11804eb68f66d84cb164c33d63

5 years agolib: istream - Do not attempt read past end in i_stream_next_line_finish
Aki Tuomi [Wed, 8 Jul 2020 07:59:48 +0000 (10:59 +0300)] 
lib: istream - Do not attempt read past end in i_stream_next_line_finish

5 years agolib-test: test_assert_strcmp_idx - Avoid double evaluation
Aki Tuomi [Wed, 8 Jul 2020 09:58:56 +0000 (12:58 +0300)] 
lib-test: test_assert_strcmp_idx - Avoid double evaluation

5 years agopop3-login: Read command more carefully
Aki Tuomi [Wed, 8 Jul 2020 05:55:31 +0000 (08:55 +0300)] 
pop3-login: Read command more carefully

Ensure we don't consume '\n' or '\0' when reading command, but
that we consume '\r' otherwise i_stream_read_next_line won't work properly.

5 years agopop3-login: Read SASL-IR properly
Aki Tuomi [Tue, 30 Jun 2020 11:02:34 +0000 (14:02 +0300)] 
pop3-login: Read SASL-IR properly

This fixes issue where login would fail if SASL-IR message would
be too long.

5 years agopop3-login: Read command separately
Aki Tuomi [Tue, 30 Jun 2020 11:01:12 +0000 (14:01 +0300)] 
pop3-login: Read command separately

Simplifies next commit

5 years agoauth: db-lua - Fix user iteration
Aki Tuomi [Wed, 1 Jul 2020 11:49:36 +0000 (14:49 +0300)] 
auth: db-lua - Fix user iteration

The old code did not leave the stack empty after finishing up,
that would lead into stack being left dirty and accumulating
per each call.

5 years agoauth: db-lua - Always set callback when iterating
Aki Tuomi [Wed, 1 Jul 2020 10:18:03 +0000 (13:18 +0300)] 
auth: db-lua - Always set callback when iterating

5 years agolib-lua: Register panic handler
Aki Tuomi [Fri, 26 Jun 2020 15:31:11 +0000 (18:31 +0300)] 
lib-lua: Register panic handler

5 years agoauth: db-lua - Ensure stack is empty at end
Aki Tuomi [Fri, 26 Jun 2020 15:27:18 +0000 (18:27 +0300)] 
auth: db-lua - Ensure stack is empty at end

5 years agoauth: db-lua - Pop dovecot after registering
Aki Tuomi [Fri, 26 Jun 2020 15:29:46 +0000 (18:29 +0300)] 
auth: db-lua - Pop dovecot after registering

5 years agoauth: db-lua - Pop result after lookup
Aki Tuomi [Fri, 26 Jun 2020 09:21:40 +0000 (12:21 +0300)] 
auth: db-lua - Pop result after lookup

When doing lookups, the lookup result was not popped.

5 years agolib-lua: Add dlua_dump_stack
Aki Tuomi [Fri, 26 Jun 2020 09:16:31 +0000 (12:16 +0300)] 
lib-lua: Add dlua_dump_stack

Useful for debugging why stack leaks

5 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

5 years agolib-mail: Fix handling trailing "--" in MIME boundaries
Timo Sirainen [Thu, 2 Jul 2020 14:31:19 +0000 (17:31 +0300)] 
lib-mail: Fix handling trailing "--" in MIME boundaries

Broken by 5b8ec27fae941d06516c30476dcf4820c6d200ab

5 years agoconfigure: Update version
Aki Tuomi [Tue, 30 Jun 2020 08:23:53 +0000 (11:23 +0300)] 
configure: Update version

5 years agoimap: Fix assert-crash in COPY/MOVE when storage doesn't return UIDs
Timo Sirainen [Thu, 11 Jun 2020 09:59:14 +0000 (12:59 +0300)] 
imap: Fix assert-crash in COPY/MOVE when storage doesn't return UIDs

For example copying mails into virtual storage crashed.

Broken by 09413e35f764a2898cbc26cea94218eed6df5cbf

Fixes:
Panic: file cmd-copy.c: line 152 (fetch_and_copy): assertion failed: (copy_ctx->copy_count == seq_range_count(&copy_ctx->saved_uids))

5 years agolib-compression: istream-zstd - Fix infinite loop when istream is nonblocking
Timo Sirainen [Tue, 9 Jun 2020 08:40:53 +0000 (11:40 +0300)] 
lib-compression: istream-zstd - Fix infinite loop when istream is nonblocking

5 years agolib-oauth2: oauth-jwt - Ensure / and . are escaped in kid
Aki Tuomi [Thu, 4 Jun 2020 10:15:11 +0000 (13:15 +0300)] 
lib-oauth2: oauth-jwt - Ensure / and . are escaped in kid

5 years agodovecot-oauth2.conf.ext: Update to match code
Aki Tuomi [Thu, 4 Jun 2020 07:41:32 +0000 (10:41 +0300)] 
dovecot-oauth2.conf.ext: Update to match code

5 years agoauth: db-oauth2 - Add more performant defaults for lib-http
Aki Tuomi [Thu, 4 Jun 2020 07:23:36 +0000 (10:23 +0300)] 
auth: db-oauth2 - Add more performant defaults for lib-http

5 years agolib-oauth2: Use azp to find token
Aki Tuomi [Wed, 3 Jun 2020 12:40:40 +0000 (15:40 +0300)] 
lib-oauth2: Use azp to find token

This validates that the token is actually for us and also allows
having multiple tokens with same ID but different issuer.

5 years agolib-oauth2: Validate signature in jwt body process
Aki Tuomi [Wed, 3 Jun 2020 12:40:04 +0000 (15:40 +0300)] 
lib-oauth2: Validate signature in jwt body process

This way we can utilize fields from body with validation.

5 years agolib-oauth2: Rename algo to alg
Aki Tuomi [Wed, 3 Jun 2020 12:35:48 +0000 (15:35 +0300)] 
lib-oauth2: Rename algo to alg

It's the field name.

5 years agolib-oauth2: Add iss validation support
Aki Tuomi [Tue, 2 Jun 2020 12:59:37 +0000 (15:59 +0300)] 
lib-oauth2: Add iss validation support

5 years agolib-oauth2: Ensure token algorithm matches with key
Aki Tuomi [Tue, 2 Jun 2020 12:52:34 +0000 (15:52 +0300)] 
lib-oauth2: Ensure token algorithm matches with key

Otherwise we might mistakenly use key that is not intended
for the token.

5 years agolib-oauth2: oauth2-jwt - Always uppercase algorithm
Aki Tuomi [Tue, 2 Jun 2020 13:07:48 +0000 (16:07 +0300)] 
lib-oauth2: oauth2-jwt - Always uppercase algorithm

5 years agolib-mail: message-parser - Fix assert-crash if parsing is stopped early
Timo Sirainen [Thu, 28 May 2020 09:49:33 +0000 (12:49 +0300)] 
lib-mail: message-parser - Fix assert-crash if parsing is stopped early

Some callers don't want to parse the full message.

Fixes:
Panic: file message-parser.c: line 793 (message_parser_deinit_from_parts): assertion failed: (ctx->nested_parts_count == 0)

5 years agolib-mail: Fix parse_too_many_nested_mime_parts()
Timo Sirainen [Wed, 27 May 2020 08:35:55 +0000 (11:35 +0300)] 
lib-mail: Fix parse_too_many_nested_mime_parts()

This was originally correct, until it was "optimized" wrong and got merged.

5 years agoauth: db-oauth2 - Remove extra oauth2 prefix from log messages
Aki Tuomi [Wed, 27 May 2020 06:09:45 +0000 (09:09 +0300)] 
auth: db-oauth2 - Remove extra oauth2 prefix from log messages

5 years agoauth, lib-oauth2: Add local introspection mode
Aki Tuomi [Tue, 26 May 2020 09:46:29 +0000 (12:46 +0300)] 
auth, lib-oauth2: Add local introspection mode

Local introspection attempts to decode token always.
This will also happen with password grant, saving
an extra roundtrip to oauth2 server.

5 years agoauth: db-oauth2 - Use common code for lookup and password grant
Aki Tuomi [Tue, 26 May 2020 06:53:26 +0000 (09:53 +0300)] 
auth: db-oauth2 - Use common code for lookup and password grant

5 years agoauth: db-oauth2 - Clarify how introspect gets called
Aki Tuomi [Tue, 26 May 2020 10:38:09 +0000 (13:38 +0300)] 
auth: db-oauth2 - Clarify how introspect gets called

This should make it more obvious when introspection
actually gets called after lookup.

Introspection failure is now also moved earlier, before
the request would fail later because not all fields
are available.

5 years agoauth: db-oauth2 - Add token parameter to db_oauth2_local_validation
Aki Tuomi [Tue, 26 May 2020 09:12:32 +0000 (12:12 +0300)] 
auth: db-oauth2 - Add token parameter to db_oauth2_local_validation

5 years agoauth: db-oauth2 - Move db_oauth2_local_validation
Aki Tuomi [Mon, 25 May 2020 18:42:08 +0000 (21:42 +0300)] 
auth: db-oauth2 - Move db_oauth2_local_validation

Simplifies next change

5 years agoauth: db-oauth2 - Move db_oauth2_lookup_continue
Aki Tuomi [Mon, 25 May 2020 18:47:35 +0000 (21:47 +0300)] 
auth: db-oauth2 - Move db_oauth2_lookup_continue

Simplifies next change

5 years agoauth: db-oauth2 - Do not fallback into remote validation anymore
Aki Tuomi [Tue, 26 May 2020 18:24:02 +0000 (21:24 +0300)] 
auth: db-oauth2 - Do not fallback into remote validation anymore

It makes no sense anymore with introspection_mode=local. One should
make another passdb.

5 years agoauth: db-oauth2 - Fix whitespace issue
Aki Tuomi [Mon, 25 May 2020 18:18:45 +0000 (21:18 +0300)] 
auth: db-oauth2 - Fix whitespace issue

5 years agolib-oauth2: Use hash instead of hash2
Aki Tuomi [Tue, 26 May 2020 18:22:51 +0000 (21:22 +0300)] 
lib-oauth2: Use hash instead of hash2

Hash2 doesn't work as we want. Fixes key caching
to actually work.

5 years agolib-oauth2: Allow nbf and iat to be 0
Aki Tuomi [Mon, 25 May 2020 13:19:14 +0000 (16:19 +0300)] 
lib-oauth2: Allow nbf and iat to be 0

Some implementations set these intentionally to 0.

5 years agolib-mail: message-parser - Support limiting max number of MIME parts
Timo Sirainen [Thu, 23 Apr 2020 14:09:33 +0000 (17:09 +0300)] 
lib-mail: message-parser - Support limiting max number of MIME parts

The default is to allow 10000 MIME parts. When it's reached, no more
MIME boundary lines will be recognized, so the rest of the mail belongs
to the last added MIME part.

5 years agolib-mail: message-parser - Support limiting max number of nested MIME parts
Timo Sirainen [Thu, 23 Apr 2020 13:59:40 +0000 (16:59 +0300)] 
lib-mail: message-parser - Support limiting max number of nested MIME parts

The default is to allow 100 nested MIME parts. When the limit is reached,
the innermost MIME part's body contains all the rest of the inner bodies
until a parent MIME part is reached.

5 years agolib-mail, global: message_parser_init*() - Convert flags to settings structure
Timo Sirainen [Thu, 23 Apr 2020 13:50:56 +0000 (16:50 +0300)] 
lib-mail, global: message_parser_init*() - Convert flags to settings structure

5 years agolib-mail: message-parser - Don't use memory pool for parser
Timo Sirainen [Thu, 23 Apr 2020 12:00:57 +0000 (15:00 +0300)] 
lib-mail: message-parser - Don't use memory pool for parser

This reduces memory usage when parsing many MIME parts where boundaries are
being added and removed constantly.

5 years agolib-mail: message-parser - Add boundary_remove_until() helper function
Timo Sirainen [Thu, 23 Apr 2020 11:53:27 +0000 (14:53 +0300)] 
lib-mail: message-parser - Add boundary_remove_until() helper function

5 years agolib-mail: message-parser - Optimize boundary lookups when exact boundary is found
Timo Sirainen [Thu, 23 Apr 2020 10:06:02 +0000 (13:06 +0300)] 
lib-mail: message-parser - Optimize boundary lookups when exact boundary is found

When an exact boundary is found, there's no need to continue looking for
more boundaries.

5 years agolib-mail: message-parser - Truncate excessively long MIME boundaries
Timo Sirainen [Thu, 23 Apr 2020 09:53:12 +0000 (12:53 +0300)] 
lib-mail: message-parser - Truncate excessively long MIME boundaries

RFC 2046 requires that the boundaries are a maximum of 70 characters
(excluding the "--" prefix and suffix). We allow 80 characters for a bit of
extra safety. Anything longer than that is truncated and treated the same
as if it was just 80 characters.

5 years agolib-mail: message-parser - Minor code cleanup to finding the end of boundary line
Timo Sirainen [Thu, 23 Apr 2020 09:10:07 +0000 (12:10 +0300)] 
lib-mail: message-parser - Minor code cleanup to finding the end of boundary line

5 years agolib-mail: message-parser - Optimize appending new part to linked list
Timo Sirainen [Thu, 23 Apr 2020 09:00:38 +0000 (12:00 +0300)] 
lib-mail: message-parser - Optimize appending new part to linked list

5 years agolib-mail: message-parser - Optimize updating children_count
Timo Sirainen [Thu, 23 Apr 2020 08:36:48 +0000 (11:36 +0300)] 
lib-mail: message-parser - Optimize updating children_count

5 years agolib-mail: message-parser - Change message_part_append() to do all work internally
Timo Sirainen [Thu, 23 Apr 2020 08:34:22 +0000 (11:34 +0300)] 
lib-mail: message-parser - Change message_part_append() to do all work internally

5 years agolib-mail: message-parser - Add a message_part_finish() helper function
Timo Sirainen [Thu, 23 Apr 2020 08:33:31 +0000 (11:33 +0300)] 
lib-mail: message-parser - Add a message_part_finish() helper function

5 years agolib-mail: Move message_parser_init_from_parts() handling to its own file
Timo Sirainen [Thu, 23 Apr 2020 08:47:18 +0000 (11:47 +0300)] 
lib-mail: Move message_parser_init_from_parts() handling to its own file

This helps to see what code they have in common.

5 years agolib-mail: test-message-parser - Test that children_count is correct
Timo Sirainen [Thu, 23 Apr 2020 08:27:14 +0000 (11:27 +0300)] 
lib-mail: test-message-parser - Test that children_count is correct

5 years agolib-mail: test-message-parser - Add another test for boundary matching
Timo Sirainen [Thu, 23 Apr 2020 08:14:04 +0000 (11:14 +0300)] 
lib-mail: test-message-parser - Add another test for boundary matching

5 years agolib-storage: mail_search_args_init() - Expand "*" in SEARCH_SEQSET
Timo Sirainen [Tue, 19 May 2020 16:11:34 +0000 (19:11 +0300)] 
lib-storage: mail_search_args_init() - Expand "*" in SEARCH_SEQSET

This is now required by the IMAP MOVE code to correctly handle
"MOVE * folder".

5 years agoimap: imap_search_seqset_iter_next() - Assert-crash if iteration doesn't progress
Timo Sirainen [Tue, 19 May 2020 15:31:31 +0000 (18:31 +0300)] 
imap: imap_search_seqset_iter_next() - Assert-crash if iteration doesn't progress

This can be done easily with seq_range_array_remove_seq_range(). This is
cleaner to use than invert+intersect. I originally didn't notice that
this function existed.

5 years agolib: Add unit test for seq_range_array_remove_range()
Timo Sirainen [Tue, 19 May 2020 16:10:59 +0000 (19:10 +0300)] 
lib: Add unit test for seq_range_array_remove_range()

5 years agolib-storage: mail_search_args_init() - Fix converting UIDSET * to SEQSET on empty...
Timo Sirainen [Mon, 18 May 2020 09:01:44 +0000 (12:01 +0300)] 
lib-storage: mail_search_args_init() - Fix converting UIDSET * to SEQSET on empty mailbox

The "*" caused seq=0 to be added to the seqset. This could have caused
unexpected issues.

Fixes at least UID MOVE on empty mailbox:
Panic: file seq-range-array.c: line 471 (seq_range_array_invert): assertion failed: (range[0].seq1 >= min_seq)

Before 1a5d89d2bfa031903e88af9aff7eafc1b373d521 this assert-crash didn't
happen, but it went to infinite loop.

5 years agoauth: test-mech - Add tests for RPA and NTLM bug
Aki Tuomi [Mon, 18 May 2020 10:08:45 +0000 (13:08 +0300)] 
auth: test-mech - Add tests for RPA and NTLM bug

5 years agolib-ntlm: Check buffer length on responses
Aki Tuomi [Mon, 18 May 2020 09:33:39 +0000 (12:33 +0300)] 
lib-ntlm: Check buffer length on responses

Add missing check for buffer length.

If this is not checked, it is possible to send message which
causes read past buffer bug.

Broken in c7480644202e5451fbed448508ea29a25cffc99c

5 years agoauth: mech-rpa - Fail on zero len buffer
Aki Tuomi [Wed, 6 May 2020 10:40:36 +0000 (13:40 +0300)] 
auth: mech-rpa - Fail on zero len buffer

5 years agopop3: Use separate search queries for expunging and setting \Seen flags
Timo Sirainen [Mon, 11 May 2020 16:00:25 +0000 (19:00 +0300)] 
pop3: Use separate search queries for expunging and setting \Seen flags

Using a single shared search query causes mail prefetching to behave
inefficiently. Especially lazy_expunge plugin could have done refcount
prefetch for non-deleted mails as well.

5 years agopop3: Split off pop3_search_build_seqset()
Timo Sirainen [Mon, 11 May 2020 16:00:04 +0000 (19:00 +0300)] 
pop3: Split off pop3_search_build_seqset()

5 years agopop3: Minor optimization to unexpected client disconnections
Timo Sirainen [Mon, 11 May 2020 15:50:18 +0000 (18:50 +0300)] 
pop3: Minor optimization to unexpected client disconnections

There's no need to build deleted messages seqset if it's not used.

5 years agodict: When client is disconnected, make sure its input IO is removed
Timo Sirainen [Thu, 14 May 2020 19:55:05 +0000 (22:55 +0300)] 
dict: When client is disconnected, make sure its input IO is removed

Just in case it takes a while to fully unreference the client, make sure its
input callback won't be called rapidly.

5 years agodict: Fix deinitializing dict iteration if client disconnects
Timo Sirainen [Thu, 14 May 2020 19:52:34 +0000 (22:52 +0300)] 
dict: Fix deinitializing dict iteration if client disconnects

If the client's ostream was full at the disconnection time, the iteration
wasn't aborted. Instead, the connection was kept forever and its input
callback was kept being called rapidly, causing 100% CPU usage.

5 years agodict: Split off cmd_iterate_flush_finish()
Timo Sirainen [Thu, 14 May 2020 19:52:08 +0000 (22:52 +0300)] 
dict: Split off cmd_iterate_flush_finish()

5 years agolmtp: lmtp-commands - Explicity prohibit empty RCPT path.
Stephan Bosch [Fri, 20 Mar 2020 12:38:41 +0000 (13:38 +0100)] 
lmtp: lmtp-commands - Explicity prohibit empty RCPT path.

The empty path <""> will yield an empty username.

5 years agolib-smtp: smtp-address - Only produce a <> address in smtp_address_clone() when that...
Stephan Bosch [Fri, 20 Mar 2020 12:37:04 +0000 (13:37 +0100)] 
lib-smtp: smtp-address - Only produce a <> address in smtp_address_clone() when that is the input.

It also produced an effective null address when the localpart was empty.

5 years agolib-smtp: smtp-address - Don't recognize an address with empty localpart as <>.
Stephan Bosch [Fri, 20 Mar 2020 12:35:19 +0000 (13:35 +0100)] 
lib-smtp: smtp-address - Don't recognize an address with empty localpart as <>.

Depending on context, the addresses <""@domain.tld> and <""> are potentially
valid non-null addresses.

5 years agolib-smtp: smtp-address - Don't return NULL from smtp_address_clone*() unless the...
Stephan Bosch [Sun, 22 Mar 2020 17:14:44 +0000 (18:14 +0100)] 
lib-smtp: smtp-address - Don't return NULL from smtp_address_clone*() unless the input is NULL.

5 years agolib-smtp: test-smtp-server-errors - Add tests for large series of empty and bad commands.
Stephan Bosch [Tue, 24 Mar 2020 11:59:15 +0000 (12:59 +0100)] 
lib-smtp: test-smtp-server-errors - Add tests for large series of empty and bad commands.

5 years agolib-smtp: smtp-server-connection - Hold a command reference while executing a command.
Stephan Bosch [Tue, 24 Mar 2020 11:25:03 +0000 (12:25 +0100)] 
lib-smtp: smtp-server-connection - Hold a command reference while executing a command.

This fixes a use-after-free problem at the end of
smtp_server_connection_handle_command().

5 years agolib-smtp: smtp-server-command - Perform initial command execution in separate function.
Stephan Bosch [Tue, 24 Mar 2020 11:23:32 +0000 (12:23 +0100)] 
lib-smtp: smtp-server-command - Perform initial command execution in separate function.

5 years agolib-smtp: smtp-server-command - Guarantee that non-destroy hooks aren't called for...
Stephan Bosch [Tue, 24 Mar 2020 11:13:43 +0000 (12:13 +0100)] 
lib-smtp: smtp-server-command - Guarantee that non-destroy hooks aren't called for an ended command.

5 years agolib-smtp: test-smtp-server-errors - Add tests for VRFY and NOOP commands with invalid...
Stephan Bosch [Tue, 24 Mar 2020 21:33:45 +0000 (22:33 +0100)] 
lib-smtp: test-smtp-server-errors - Add tests for VRFY and NOOP commands with invalid parameters.

5 years agolib-smtp: Add tests for smtp_string_parse() and smtp_string_write().
Stephan Bosch [Tue, 24 Mar 2020 21:24:20 +0000 (22:24 +0100)] 
lib-smtp: Add tests for smtp_string_parse() and smtp_string_write().

5 years agolib-smtp: smtp-syntax - Return 0 for smtp_string_parse() with empty input.
Stephan Bosch [Tue, 24 Mar 2020 21:42:15 +0000 (22:42 +0100)] 
lib-smtp: smtp-syntax - Return 0 for smtp_string_parse() with empty input.

This is what the current users of this function actually expect.

5 years agolib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_ehlo_line_parse().
Stephan Bosch [Tue, 24 Mar 2020 20:14:34 +0000 (21:14 +0100)] 
lib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_ehlo_line_parse().

5 years agolib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_xtext_parse().
Stephan Bosch [Tue, 24 Mar 2020 20:11:01 +0000 (21:11 +0100)] 
lib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_xtext_parse().

5 years agolib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_string_parse().
Stephan Bosch [Tue, 24 Mar 2020 19:57:03 +0000 (20:57 +0100)] 
lib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_string_parse().

5 years agolib-smtp: smtp-server-cmd-vrfy - Restructure parameter parsing.
Stephan Bosch [Tue, 24 Mar 2020 20:05:17 +0000 (21:05 +0100)] 
lib-smtp: smtp-server-cmd-vrfy - Restructure parameter parsing.

5 years agolib-smtp: Reformat smtp-server-cmd-vrfy.c.
Stephan Bosch [Tue, 24 Mar 2020 20:00:19 +0000 (21:00 +0100)] 
lib-smtp: Reformat smtp-server-cmd-vrfy.c.

5 years agolib-smtp: Reformat smtp-server-cmd-noop.c.
Stephan Bosch [Tue, 24 Mar 2020 20:08:37 +0000 (21:08 +0100)] 
lib-smtp: Reformat smtp-server-cmd-noop.c.

5 years agolib-smtp: Reformat smtp-syntax.c.
Stephan Bosch [Tue, 24 Mar 2020 19:51:24 +0000 (20:51 +0100)] 
lib-smtp: Reformat smtp-syntax.c.

5 years agolib-smtp: Reformat smtp-syntax.h.
Stephan Bosch [Tue, 24 Mar 2020 19:45:21 +0000 (20:45 +0100)] 
lib-smtp: Reformat smtp-syntax.h.

5 years agoauth: test-mech - Remove auth-token-secret.dat after test suite
Aki Tuomi [Wed, 13 May 2020 07:52:50 +0000 (10:52 +0300)] 
auth: test-mech - Remove auth-token-secret.dat after test suite

5 years agoauth: mech-digest-md5 - Do not read past buffer on right trim
Aki Tuomi [Tue, 12 May 2020 06:48:06 +0000 (09:48 +0300)] 
auth: mech-digest-md5 - Do not read past buffer on right trim

If the string does not have comma at the end, do not progress
the pointer past buffer end.

5 years agoauth: test-mech - Fix memory leaks
Aki Tuomi [Tue, 12 May 2020 06:22:20 +0000 (09:22 +0300)] 
auth: test-mech - Fix memory leaks

Forgotten in f6bb82a222e7973e9f9b7056dfe015fe3d8632f7

5 years agolib-index: Index rebuilding lost fields in cache
Timo Sirainen [Mon, 11 May 2020 14:25:41 +0000 (17:25 +0300)] 
lib-index: Index rebuilding lost fields in cache

Regression caused by 5f6d2134690e4b84d38d556e3086668e32f30b50

5 years agolib-index: Fix setting initial last_used for fields in mail_[always_]cache_fields
Timo Sirainen [Mon, 11 May 2020 14:23:19 +0000 (17:23 +0300)] 
lib-index: Fix setting initial last_used for fields in mail_[always_]cache_fields

These fields had last_used=0 until the field was accessed. If cache was
purged before this access, the field was dropped. Fixed by assuming
(last_used=0, decision!=NO) is still the first time the field is being
used. This also causes it to trigger mail_cache_decision_changed event.