]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
2 months agolib-smtp: Reformat smtp-server-reply.c
Stephan Bosch [Tue, 24 Mar 2026 02:32:02 +0000 (03:32 +0100)] 
lib-smtp: Reformat smtp-server-reply.c

2 months agoindexer-worker: Drop root privileges permanently
Timo Sirainen [Wed, 1 Apr 2026 16:00:46 +0000 (19:00 +0300)] 
indexer-worker: Drop root privileges permanently

2 months agoindexer-worker: Change default restart_request_count
Timo Sirainen [Wed, 1 Apr 2026 15:59:52 +0000 (18:59 +0300)] 
indexer-worker: Change default restart_request_count

For Pro, use default 1000 like with imap/pop3/etc processes.

For CE, use default 1 so that it works with multiple UIDs after the
following change.

Add settings history only for Pro, because with CE the old default
value might not work anymore now that root privileges are permanetly
dropped.

2 months agoutil: script-login - Don't allow running as root
Timo Sirainen [Wed, 1 Apr 2026 15:11:57 +0000 (18:11 +0300)] 
util: script-login - Don't allow running as root

Originally it it was forgotten to be prevented, and it was changed to be
explicitly allowed by e0dae5d76ea0a4aef849602750ce73dfae995bc8.

2 months agoquota: quota-status - Don't allow running as root
Timo Sirainen [Wed, 1 Apr 2026 15:09:42 +0000 (18:09 +0300)] 
quota: quota-status - Don't allow running as root

Originally it it was forgotten to be prevented, and it was changed to be
explicitly allowed by e0dae5d76ea0a4aef849602750ce73dfae995bc8.

2 months agolib-auth-client: Avoid "unknown id" errors for aborted auth requests
Timo Sirainen [Thu, 26 Mar 2026 11:31:53 +0000 (13:31 +0200)] 
lib-auth-client: Avoid "unknown id" errors for aborted auth requests

Delay freeing aborted request until its response is received or auth server
is disconnected.

Fixes:
Error: auth-client: conn ...: Auth entication server sent unknown id ...

2 months agolib-auth-client, auth: CANCEL command now replies with CANCELLED reply
Timo Sirainen [Thu, 26 Mar 2026 12:27:27 +0000 (14:27 +0200)] 
lib-auth-client, auth: CANCEL command now replies with CANCELLED reply

This is done when auth client protocol is >=v1.4. The CANCELLED reply is
used to free the auth request, if it still exists.

2 months agologin-common: When process is full, don't destroy clients waiting on master auth
Timo Sirainen [Thu, 26 Mar 2026 10:19:36 +0000 (12:19 +0200)] 
login-common: When process is full, don't destroy clients waiting on master auth

These clients have already successfully authenticated. Killing their client
is only going to cause errors.

2 months agologin-common: Give better reason for auth_client_request_abort()
Timo Sirainen [Thu, 26 Mar 2026 10:01:55 +0000 (12:01 +0200)] 
login-common: Give better reason for auth_client_request_abort()

2 months agologin-common: Remove unused client_auth_abort()
Timo Sirainen [Thu, 26 Mar 2026 10:00:16 +0000 (12:00 +0200)] 
login-common: Remove unused client_auth_abort()

2 months agolib-master: Fix crash when reaching client_limit with restart_request_count>1 and...
Timo Sirainen [Thu, 26 Mar 2026 09:45:24 +0000 (11:45 +0200)] 
lib-master: Fix crash when reaching client_limit with restart_request_count>1 and client_limit>1

Fixes:
Panic: file master-service.c: line 1909 (master_service_listen): assertion failed: (service->master_status.available_count > 0)

2 months agolib-master, master: Fix behavior for services with client_limit>1 and restart_request...
Timo Sirainen [Wed, 25 Mar 2026 09:30:20 +0000 (11:30 +0200)] 
lib-master, master: Fix behavior for services with client_limit>1 and restart_request_count

Especially login processes are commonly configured to use client_limit > 1
and process_limit = process_min_avail = number of CPUs. However, this
prevents using restart_request_count, because long lived connections
can reserve the process and prevent a new one from being launched.

Change the behavior so that when restart_request_count is reached for a
process whose service has client_limit > 1, the process is no longer
counted towards process_limit.

2 months agomaster: service_status_more() - Change status parameter to status_available_count
Timo Sirainen [Wed, 25 Mar 2026 09:45:56 +0000 (11:45 +0200)] 
master: service_status_more() - Change status parameter to status_available_count

Simplifies the next commit.

2 months agolib-http: Count time spent in any ioloop waiting on HTTP request as "http ioloop"
Timo Sirainen [Tue, 31 Mar 2026 15:35:07 +0000 (18:35 +0300)] 
lib-http: Count time spent in any ioloop waiting on HTTP request as "http ioloop"

Previously only http_client_wait() caused times to be counted in "http
ioloop". This isn't relevant though. The important difference is that
time spent on "http ioloop" is actually time spent on waiting for the
HTTP request, while "other ioloop" is time spent on waiting for an ioloop
without the HTTP request.

2 months agovirtual: virtual_storage_create() - Deny index rather than allowing just fs
Marco Bettini [Mon, 30 Mar 2026 12:34:54 +0000 (12:34 +0000)] 
virtual: virtual_storage_create() - Deny index rather than allowing just fs

2 months agom4: want_mysql.m4 - Fix detecting SSL support with libmariadb
Timo Sirainen [Wed, 1 Apr 2026 12:22:16 +0000 (15:22 +0300)] 
m4: want_mysql.m4 - Fix detecting SSL support with libmariadb

2 months agolib-regex: Fix memory leak when replace pattern doesn't match
Timo Sirainen [Wed, 1 Apr 2026 13:06:05 +0000 (16:06 +0300)] 
lib-regex: Fix memory leak when replace pattern doesn't match

2 months agolib-program-client: program-client - Assert that program_input is set in program_clie...
Stephan Bosch [Sat, 28 Mar 2026 19:50:55 +0000 (20:50 +0100)] 
lib-program-client: program-client - Assert that program_input is set in program_client_input_finish()

Even though all paths leading to this function make sure it is assigned,
Coverity is worried about it being NULL at some point (CID: 42244).

2 months agolib-json: json-istream - Assert that value_stream either both set or unset in json_is...
Stephan Bosch [Sat, 28 Mar 2026 19:46:40 +0000 (20:46 +0100)] 
lib-json: json-istream - Assert that value_stream either both set or unset in json_istream_consume_value_stream()

This confuses Coverity otherwise (CID: 42255).

2 months agolib-http: http-server-request - Assert that response is set in http_server_request_fi...
Stephan Bosch [Sat, 28 Mar 2026 19:32:57 +0000 (20:32 +0100)] 
lib-http: http-server-request - Assert that response is set in http_server_request_finished()

Previous code suggested it may be NULL, which is not true.

Found by Coverity (CID: 42271)

2 months agolib-auth: auth-scram-server - Assert that hash method never gets to be NULL somehow
Stephan Bosch [Sat, 28 Mar 2026 19:18:15 +0000 (20:18 +0100)] 
lib-auth: auth-scram-server - Assert that hash method never gets to be NULL somehow

Stack-based buffer sizes are based on it a field in the hash method struct. An
assert is easier to debug than a segfault. Also, this makes code consistent with
auth-scram-client.

2 months agolib-auth: auth-scram-client - Check assertions earlier so that no segfault is trigger...
Stephan Bosch [Sat, 28 Mar 2026 19:14:03 +0000 (20:14 +0100)] 
lib-auth: auth-scram-client - Check assertions earlier so that no segfault is triggered instead

Issue found by Coverity (CID: 42292)

2 months agolib-var-expand: Remove pointless assigment in var_expand_program_execute_one_real()
Aki Tuomi [Tue, 31 Mar 2026 10:24:37 +0000 (13:24 +0300)] 
lib-var-expand: Remove pointless assigment in var_expand_program_execute_one_real()

Forgotten from 2b8036fbb90c0c0d716ee419a5595a4328c118be

2 months agodoveadm: Remove CORS headers from OPTIONS reply
Aki Tuomi [Mon, 30 Mar 2026 18:30:45 +0000 (21:30 +0300)] 
doveadm: Remove CORS headers from OPTIONS reply

2 months agolib-program-client: program-client-local - Drop any real root privileges before progr...
Stephan Bosch [Tue, 10 Mar 2026 04:16:52 +0000 (05:16 +0100)] 
lib-program-client: program-client-local - Drop any real root privileges before program execvp()

Running programs with real root privileges while the effective privileges are
user-level is risky and often unexpected.

2 months agoauth: auth_request_validate_client_fp() - Ensure client certificate can be checked
Karl Fleischmann [Fri, 20 Mar 2026 08:48:52 +0000 (09:48 +0100)] 
auth: auth_request_validate_client_fp() - Ensure client certificate can be checked

2 months agolib-sasl: oauth2 - Send configured scope for failure responses
Aki Tuomi [Mon, 16 Mar 2026 11:44:33 +0000 (13:44 +0200)] 
lib-sasl: oauth2 - Send configured scope for failure responses

2 months agoauth: sasl-mech-oauth2 - Add scope to sasl settings for failure responses
Aki Tuomi [Mon, 16 Mar 2026 06:52:49 +0000 (08:52 +0200)] 
auth: sasl-mech-oauth2 - Add scope to sasl settings for failure responses

2 months agoauth: db-oauth2 - Add accessor for space separated list of scopes
Aki Tuomi [Mon, 16 Mar 2026 06:52:06 +0000 (08:52 +0200)] 
auth: db-oauth2 - Add accessor for space separated list of scopes

2 months agolib-sasl: Allow passing scope for failures
Aki Tuomi [Mon, 16 Mar 2026 06:48:54 +0000 (08:48 +0200)] 
lib-sasl: Allow passing scope for failures

2 months agoauth: Use Lua libraries conditionally in test-auth
Aki Tuomi [Fri, 27 Mar 2026 13:04:24 +0000 (15:04 +0200)] 
auth: Use Lua libraries conditionally in test-auth

2 months agom4: want_lua - Check that lualib header exists
Aki Tuomi [Fri, 27 Mar 2026 12:13:45 +0000 (14:13 +0200)] 
m4: want_lua - Check that lualib header exists

2 months agoNEWS: Add news for 2.4.3
Aki Tuomi [Thu, 26 Feb 2026 12:32:23 +0000 (14:32 +0200)] 
NEWS: Add news for 2.4.3

2 months agolib-sql: driver-sqlite - Fail with empty query
Aki Tuomi [Thu, 12 Mar 2026 15:14:31 +0000 (17:14 +0200)] 
lib-sql: driver-sqlite - Fail with empty query

By default SQLite happily accepts empty query, so we need to
error out.

2 months agoauth: passdb-sql - Require update_query to be set when used
Aki Tuomi [Wed, 11 Mar 2026 10:46:53 +0000 (12:46 +0200)] 
auth: passdb-sql - Require update_query to be set when used

2 months agoauth: Initialize set_credentials event properly
Aki Tuomi [Mon, 9 Mar 2026 19:23:29 +0000 (21:23 +0200)] 
auth: Initialize set_credentials event properly

Fixes update_query

2 months agoauth: Move passdb event lifecycle handling to auth_request_passdb_event_(begin|end)
Aki Tuomi [Wed, 11 Mar 2026 10:30:32 +0000 (12:30 +0200)] 
auth: Move passdb event lifecycle handling to auth_request_passdb_event_(begin|end)

2 months agoauth: cache - Use translated username in auth_cache_remove()
Aki Tuomi [Mon, 9 Mar 2026 18:04:27 +0000 (20:04 +0200)] 
auth: cache - Use translated username in auth_cache_remove()

2 months agolib-index: mail_index_try_read_map() - Add assert that header_size is small enough
Timo Sirainen [Thu, 29 Jan 2026 11:34:39 +0000 (13:34 +0200)] 
lib-index: mail_index_try_read_map() - Add assert that header_size is small enough

2 months agolib-index: Fix detecting overly large mail_index_header.messages_count
Timo Sirainen [Thu, 29 Jan 2026 11:33:14 +0000 (13:33 +0200)] 
lib-index: Fix detecting overly large mail_index_header.messages_count

The previous check overflowed the integer calculation, which prevented the
check from working correctly.

This commit also removes the unnecessary
mail_index_record_map.mmap_used_size.

2 months agodoveadm: client-connection - Get API key from per-connection settings
Aki Tuomi [Wed, 4 Mar 2026 12:39:43 +0000 (14:39 +0200)] 
doveadm: client-connection - Get API key from per-connection settings

2 months agodoveadm: Use datastack for temporary b64 value
Aki Tuomi [Wed, 4 Mar 2026 07:28:18 +0000 (09:28 +0200)] 
doveadm: Use datastack for temporary b64 value

There is no need to allocate it from connection pool.

2 months agodoveadm: client-connection - Use timing safe credential check
Aki Tuomi [Wed, 4 Mar 2026 06:05:13 +0000 (08:05 +0200)] 
doveadm: client-connection - Use timing safe credential check

2 months agoglobal: Use const for struct imap_parser_params params
Timo Sirainen [Mon, 2 Mar 2026 11:50:24 +0000 (13:50 +0200)] 
global: Use const for struct imap_parser_params params

2 months agoimap-login: Limit the number of open IMAP parser lists
Timo Sirainen [Fri, 6 Mar 2026 13:35:12 +0000 (15:35 +0200)] 
imap-login: Limit the number of open IMAP parser lists

This prevents attackers from using a large number of '(' in a command to
grow memory usage excessively.

2 months agolib-imap: Add imap_parser_params.list_count_limit
Timo Sirainen [Fri, 6 Mar 2026 13:32:29 +0000 (15:32 +0200)] 
lib-imap: Add imap_parser_params.list_count_limit

2 months agolib-imap, global: Add params parameter to imap_parser_create()
Timo Sirainen [Fri, 6 Mar 2026 13:25:14 +0000 (15:25 +0200)] 
lib-imap, global: Add params parameter to imap_parser_create()

2 months agoauth: userdb sql - Fix escaping for user iteration
Timo Sirainen [Tue, 24 Feb 2026 10:26:46 +0000 (12:26 +0200)] 
auth: userdb sql - Fix escaping for user iteration

This is mostly a non-issue, since userdb iteration doesn't take any
untrusted input.

Broken by ef0c63b690e6ef9fbd53cb815dfab50d1667ba3a

2 months agoauth: passdb sql - Fix escaping for set_credentials()
Timo Sirainen [Tue, 24 Feb 2026 10:24:37 +0000 (12:24 +0200)] 
auth: passdb sql - Fix escaping for set_credentials()

This was only used by OTP SASL mechanism after successful authentication, so
it practically couldn't be used for SQL injections.

Broken by ef0c63b690e6ef9fbd53cb815dfab50d1667ba3a

2 months agoauth: Rewrite ldap_escape() with a unit test
Timo Sirainen [Mon, 23 Feb 2026 17:54:40 +0000 (19:54 +0200)] 
auth: Rewrite ldap_escape() with a unit test

2 months agoauth: test-auth - Run Lua unit tests even when building Lua as plugin
Timo Sirainen [Mon, 23 Feb 2026 17:33:16 +0000 (19:33 +0200)] 
auth: test-auth - Run Lua unit tests even when building Lua as plugin

2 months agolib-settings: settings_get_params() - Fix using provided escape_func
Timo Sirainen [Mon, 23 Feb 2026 11:37:09 +0000 (13:37 +0200)] 
lib-settings: settings_get_params() - Fix using provided escape_func

This fixes auth-sql and auth-ldap to actually do escaping.

2 months agoauth: passdb/userdb ldap - Fix escaping ldap filter, base and bind_userdn
Timo Sirainen [Fri, 20 Feb 2026 16:37:38 +0000 (18:37 +0200)] 
auth: passdb/userdb ldap - Fix escaping ldap filter, base and bind_userdn

Broken by c2ccdab8d09dec65753ee42366f48d53d7f47cfd

2 months agoauth: Make struct settings_get_params params const
Timo Sirainen [Wed, 25 Feb 2026 07:33:25 +0000 (09:33 +0200)] 
auth: Make struct settings_get_params params const

2 months agolib-mail: Limit the number of RFC2231 parameters that can be parsed
Timo Sirainen [Tue, 24 Feb 2026 11:11:14 +0000 (13:11 +0200)] 
lib-mail: Limit the number of RFC2231 parameters that can be parsed

This avoids excessive CPU usage especially in result_append().

2 months agofts: Remove decode2text.sh
Aki Tuomi [Thu, 8 Jan 2026 06:51:59 +0000 (08:51 +0200)] 
fts: Remove decode2text.sh

The script is flawed and not fit for production use, should
recommend writing your own script, or using Apache Tika.

2 months agoauth: Don't disconnect auth client when invalid base64 SASL input is received
Timo Sirainen [Tue, 4 Nov 2025 09:34:30 +0000 (11:34 +0200)] 
auth: Don't disconnect auth client when invalid base64 SASL input is received

The base64 input comes from untrusted client. It shouldn't cause the auth
client to disconnect, which causes other concurrent logins to be aborted.

Broken by 1486c30e191ff079bfa78e7950173bb33d8073d9

2 months agoimap: test-imap-client-hibernate - Shorten test directory path
Timo Sirainen [Wed, 25 Mar 2026 15:33:28 +0000 (17:33 +0200)] 
imap: test-imap-client-hibernate - Shorten test directory path

Helps to avoid errors:
net_listen_unix(.../imap-hibernate) failed: File name too long

2 months agolib-storage: mail-storage - Avoid checking new mailbox name for forbidden characters...
Stephan Bosch [Wed, 25 Mar 2026 20:56:24 +0000 (21:56 +0100)] 
lib-storage: mail-storage - Avoid checking new mailbox name for forbidden characters for implicit NFC rename

Since NFC normalization does not change a text to suddenly contain characters
that are forbidden in a mailbox name, the original mailbox name already
contained the forbidden characters. There is no point in forbidding the
characters in the implicit rename.

2 months agolib-dcrypt: Use clean version of cryptographic pools
Karl Fleischmann [Tue, 24 Mar 2026 08:32:27 +0000 (09:32 +0100)] 
lib-dcrypt: Use clean version of cryptographic pools

Ensure blocks are safely cleaned on destruction.

2 months agoauth: Use unique directory for base_dir for unit tests
Aki Tuomi [Mon, 23 Mar 2026 19:31:59 +0000 (21:31 +0200)] 
auth: Use unique directory for base_dir for unit tests

Otherwise auth-token-secret.dat might get clobbered by other
tests when running in parallel.

2 months agoauth: test-auth-cache - Fix error matching on older distros
Aki Tuomi [Mon, 23 Mar 2026 13:51:05 +0000 (15:51 +0200)] 
auth: test-auth-cache - Fix error matching on older distros

2 months agolib-var-expand: Change var_expand_parameter_value to struct
Aki Tuomi [Mon, 23 Mar 2026 10:10:30 +0000 (12:10 +0200)] 
lib-var-expand: Change var_expand_parameter_value to struct

2 months agolib-var-expand: Limit padding in hex and hexlify to 256 bytes
Aki Tuomi [Sun, 22 Mar 2026 20:08:01 +0000 (22:08 +0200)] 
lib-var-expand: Limit padding in hex and hexlify to 256 bytes

2 months agolib-var-expand: Add fuzz-var-expand-import
Aki Tuomi [Sun, 22 Mar 2026 20:06:34 +0000 (22:06 +0200)] 
lib-var-expand: Add fuzz-var-expand-import

2 months agolib-var-expand: Harden program import
Aki Tuomi [Sun, 22 Mar 2026 20:06:23 +0000 (22:06 +0200)] 
lib-var-expand: Harden program import

2 months agolib-var-expand: Use value for error in var_expand_parameter_bool_or_var()
Aki Tuomi [Sun, 22 Mar 2026 18:52:55 +0000 (20:52 +0200)] 
lib-var-expand: Use value for error in var_expand_parameter_bool_or_var()

2 months agolib-var-expand: Check that modulo is positive in special case for fn_calculate()
Aki Tuomi [Sun, 22 Mar 2026 18:51:26 +0000 (20:51 +0200)] 
lib-var-expand: Check that modulo is positive in special case for fn_calculate()

2 months agolib-var-expand: Fix delayed error handling
Aki Tuomi [Sun, 22 Mar 2026 20:24:39 +0000 (22:24 +0200)] 
lib-var-expand: Fix delayed error handling

Broken by 2b8036fbb90c0c0d716ee419a5595a4328c118be

2 months agolib-mail: translation_buf_decode() - Fix comments
Timo Sirainen [Fri, 20 Mar 2026 22:12:40 +0000 (00:12 +0200)] 
lib-mail: translation_buf_decode() - Fix comments

2 months agolib-mail: Fix another potential assert-crash when parsing illegal charset translation...
Timo Sirainen [Fri, 20 Mar 2026 22:11:53 +0000 (00:11 +0200)] 
lib-mail: Fix another potential assert-crash when parsing illegal charset translation sequence

The fix in 110c19e44e95be6b6d2b09cf994ce5b502c8dd8c was incomplete.

2 months agolib-http: Limit chunked transfer trailer size
Michael M Slusarz [Fri, 13 Mar 2026 03:16:02 +0000 (21:16 -0600)] 
lib-http: Limit chunked transfer trailer size

The HTTP chunked transfer parser (`http_transfer_chunked_parse_trailer`)
previously instantiated a header parser for the trailer without applying
any header limits, leading to potential resource exhaustion.

2 months agofeat: Add IMAP4rev1 capability check to imap-login proxy
google-labs-jules[bot] [Wed, 22 Oct 2025 18:53:57 +0000 (18:53 +0000)] 
feat: Add IMAP4rev1 capability check to imap-login proxy

The imap-login proxy now checks if the remote server advertises the IMAP4rev1 capability. If the capability is not found, the proxying will fail with an error message.

2 months agolib-var-expand: Initialize providers to NULL
Aki Tuomi [Fri, 20 Mar 2026 20:19:27 +0000 (22:19 +0200)] 
lib-var-expand: Initialize providers to NULL

Satisifies older compilers

2 months agologin-common: Add some unit tests
Aki Tuomi [Wed, 11 Mar 2026 08:06:59 +0000 (10:06 +0200)] 
login-common: Add some unit tests

2 months agologin-common: Create clients using master_service event
Aki Tuomi [Wed, 11 Mar 2026 08:03:50 +0000 (10:03 +0200)] 
login-common: Create clients using master_service event

2 months agologin-common: Use var_expand_template() to simplify logging
Aki Tuomi [Thu, 29 Jan 2026 12:59:46 +0000 (14:59 +0200)] 
login-common: Use var_expand_template() to simplify logging

2 months agolib-var-expand: Add var_expand_program_to_string()
Aki Tuomi [Fri, 20 Mar 2026 09:03:31 +0000 (11:03 +0200)] 
lib-var-expand: Add var_expand_program_to_string()

2 months agolib-var-expand: Add var_expand_program_has_variable()
Aki Tuomi [Thu, 29 Jan 2026 18:00:26 +0000 (20:00 +0200)] 
lib-var-expand: Add var_expand_program_has_variable()

Checks if the program has variable.

2 months agolib-var-expand: Add var_expand_program_template|split()
Aki Tuomi [Thu, 29 Jan 2026 09:19:25 +0000 (11:19 +0200)] 
lib-var-expand: Add var_expand_program_template|split()

These functions can be used to separate literals and actual programs
from a expansion program, this can be useful when template needs
to be processed for SQL queries or similar purposes.

2 months agolib-var-expand: Add var_expand_program_execute_one()
Aki Tuomi [Thu, 29 Jan 2026 09:22:12 +0000 (11:22 +0200)] 
lib-var-expand: Add var_expand_program_execute_one()

Executes first program in expansion program.

2 months agolib-var-expand: Extract var_expand_program_execute_one_real()
Aki Tuomi [Thu, 29 Jan 2026 09:18:58 +0000 (11:18 +0200)] 
lib-var-expand: Extract var_expand_program_execute_one_real()

Executes one expansion program.

2 months agolib-var-expand: Extract prepare_state()
Aki Tuomi [Thu, 29 Jan 2026 10:59:37 +0000 (12:59 +0200)] 
lib-var-expand: Extract prepare_state()

2 months agolib-var-expand: Add small description to header
Aki Tuomi [Fri, 30 Jan 2026 07:08:34 +0000 (09:08 +0200)] 
lib-var-expand: Add small description to header

2 months agolib-var-expand: Reformat expansion-program.c
Aki Tuomi [Thu, 26 Feb 2026 10:36:24 +0000 (12:36 +0200)] 
lib-var-expand: Reformat expansion-program.c

2 months agolib-dict-extra: Escape paths in username for private dict keys
Karl Fleischmann [Wed, 18 Mar 2026 13:58:50 +0000 (14:58 +0100)] 
lib-dict-extra: Escape paths in username for private dict keys

Prevent path traversal issues in username when doing dict lookups with
private dict keys.

2 months agolib-dict-extra: test-dict-fs - Parametrize username testing
Karl Fleischmann [Wed, 18 Mar 2026 14:08:09 +0000 (15:08 +0100)] 
lib-dict-extra: test-dict-fs - Parametrize username testing

This will allow testing path traversal behavior in a follow-up commit.

2 months agolib-mail: Fix potential assert-crash when parsing illegal charset translation sequence
Timo Sirainen [Wed, 18 Mar 2026 11:45:35 +0000 (13:45 +0200)] 
lib-mail: Fix potential assert-crash when parsing illegal charset translation sequence

The assert was added by 7aad885a21e7b3832fa98f41613097383603929f

2 months agolib: UNICODE_*_CHAR_UTF8_LEN - Remove extra ; from macros
Timo Sirainen [Thu, 19 Mar 2026 08:47:19 +0000 (10:47 +0200)] 
lib: UNICODE_*_CHAR_UTF8_LEN - Remove extra ; from macros

2 months agolib-var-expand: Reduce truncated buffer size only if necessary
Karl Fleischmann [Thu, 19 Mar 2026 10:53:22 +0000 (11:53 +0100)] 
lib-var-expand: Reduce truncated buffer size only if necessary

2 months agolib-storage, imap: Fix token authentication when re-hibernating IMAP session
Timo Sirainen [Tue, 17 Mar 2026 12:30:47 +0000 (14:30 +0200)] 
lib-storage, imap: Fix token authentication when re-hibernating IMAP session

Preserve the original session's PID as auth_token_session_pid in userdb
fields next to auth_token field.

2 months agoimap: Add logging details for auth tokens
Timo Sirainen [Tue, 17 Mar 2026 11:58:48 +0000 (13:58 +0200)] 
imap: Add logging details for auth tokens

2 months agoauth: Add debug logging for auth token details
Timo Sirainen [Tue, 17 Mar 2026 11:58:19 +0000 (13:58 +0200)] 
auth: Add debug logging for auth token details

2 months agoimap-hibernate: Explicitly copy individual state fields
Timo Sirainen [Tue, 17 Mar 2026 11:56:41 +0000 (13:56 +0200)] 
imap-hibernate: Explicitly copy individual state fields

This should reduce accidentally forgetting to strdup() some of the added
fields. Also it was confusing because mail_log_prefix was intentionally
not strdup()ed but the pointer was still copied.

2 months agoimap: Fail hibernation early if auth_token is missing for user
Timo Sirainen [Tue, 17 Mar 2026 11:55:29 +0000 (13:55 +0200)] 
imap: Fail hibernation early if auth_token is missing for user

2 months agolib-dcrypt: Use provided algorithm in dcrypt_openssl_digest()
Aki Tuomi [Thu, 19 Mar 2026 07:37:45 +0000 (09:37 +0200)] 
lib-dcrypt: Use provided algorithm in dcrypt_openssl_digest()

Broken in 7dee2781943863ebebd9d8ee8602a0e97ff094a8

2 months agolib-settings: settings-history-core.txt - Add missing imap-master socket history
Timo Sirainen [Mon, 16 Mar 2026 16:37:41 +0000 (18:37 +0200)] 
lib-settings: settings-history-core.txt - Add missing imap-master socket history

Forgotten in aaadfd97448c79310264e696ecf50f223cf3ff78

2 months agolib-settings: settings-history-core.txt - Fix anvil-auth-penalty history
Timo Sirainen [Mon, 16 Mar 2026 16:36:06 +0000 (18:36 +0200)] 
lib-settings: settings-history-core.txt - Fix anvil-auth-penalty history

Broken by a42c7271006750775b6751aa1b98242595e696b3

2 months agolib-dcrypt: Require encryption key hash length to match hash algorithm
Aki Tuomi [Mon, 16 Mar 2026 17:55:04 +0000 (19:55 +0200)] 
lib-dcrypt: Require encryption key hash length to match hash algorithm

2 months agofs-posix: Implement file_equals()
Timo Sirainen [Wed, 11 Mar 2026 17:11:21 +0000 (19:11 +0200)] 
fs-posix: Implement file_equals()