]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Stephan Bosch [Mon, 11 Nov 2019 17:55:37 +0000 (18:55 +0100)]
lib-http: http-server-connection - Add http_server_connection_input_set_pending().
Stephan Bosch [Mon, 11 Nov 2019 16:01:47 +0000 (17:01 +0100)]
lib-http: http-server-connection - Publish internal API for halting and resuming connection input handling.
Stephan Bosch [Sat, 9 Nov 2019 10:02:56 +0000 (11:02 +0100)]
lib-http: http-server-connection - Add internal API for halting and resuming connection output handling.
Stephan Bosch [Mon, 11 Nov 2019 23:57:39 +0000 (00:57 +0100)]
lib-http: test-http-server-errors - Fix name of client_connection_deinit().
Stephan Bosch [Mon, 11 Nov 2019 23:56:30 +0000 (00:56 +0100)]
lib-http: test-http-server-errors - Ignore SIGPIPE.
Stephan Bosch [Mon, 11 Nov 2019 22:37:01 +0000 (23:37 +0100)]
lib-http: test-http-server-errors - Add log prefixes to distinguish client and server debug messages.
Stephan Bosch [Mon, 11 Nov 2019 21:55:54 +0000 (22:55 +0100)]
lib-http: Reformat test-http-server-errors.c.
Stephan Bosch [Fri, 15 Nov 2019 16:31:07 +0000 (17:31 +0100)]
lib-http: test-http-payload - Add tests for the old blocking server payload output API.
Stephan Bosch [Mon, 11 Nov 2019 17:01:33 +0000 (18:01 +0100)]
lib-http: test-http-payload - Properly finish blocking server payload output.
Stephan Bosch [Wed, 4 Apr 2018 01:23:15 +0000 (03:23 +0200)]
lib-http: test-http-payload - Use client request object for test_client_echo_finished() rather than index.
Stephan Bosch [Wed, 4 Apr 2018 01:18:55 +0000 (03:18 +0200)]
lib-http: test-http-payload - Use client request object for test_client_download_finished() rather than index.
Stephan Bosch [Wed, 4 Apr 2018 08:10:09 +0000 (10:10 +0200)]
lib-http: test-http-payload - echo: Manage active requests asynchronously.
Stephan Bosch [Wed, 4 Apr 2018 01:10:58 +0000 (03:10 +0200)]
lib-http: test-http-payload - Rename client request file stream field to 'file_in'.
This is the stream used to compare against the incoming payload (either download or echo).
Stephan Bosch [Sun, 25 Mar 2018 20:02:33 +0000 (22:02 +0200)]
lib-http: test-http-payload - Group test settings into a common struct.
Allows reliable initialization.
Stephan Bosch [Tue, 20 Mar 2018 18:16:33 +0000 (19:16 +0100)]
lib-http: test-http-payload - Add log prefixes to distinguish client and server debug messages.
Stephan Bosch [Wed, 4 Apr 2018 08:25:59 +0000 (10:25 +0200)]
lib-http: test-http-payload - Only switch ioloop for progress timeout when it is running.
Stephan Bosch [Wed, 4 Apr 2018 08:18:41 +0000 (10:18 +0200)]
lib-http: test-http-payload - Do not continue running ioloop when failure occurred.
Stephan Bosch [Wed, 4 Apr 2018 11:58:00 +0000 (13:58 +0200)]
lib-http: test-http-payload - echo: Add debug message for when incoming payload is finished.
Stephan Bosch [Wed, 4 Apr 2018 11:56:15 +0000 (13:56 +0200)]
lib-http: test-http-payload - echo: Properly handle empty payload.
Stephan Bosch [Wed, 4 Apr 2018 11:27:53 +0000 (13:27 +0200)]
lib-http: Reformat test-http-payload.c.
Stephan Bosch [Sun, 17 Nov 2019 23:11:43 +0000 (00:11 +0100)]
lib-http: http-server-connection - Fix http_server_connection_flush() return value.
Stephan Bosch [Sat, 9 Nov 2019 09:47:22 +0000 (10:47 +0100)]
lib-http: http-server-connection - Add support for switching to an explicit ioloop.
Stephan Bosch [Sat, 9 Nov 2019 09:47:04 +0000 (10:47 +0100)]
lib: iostream-pump - Add support for switching to an explicit ioloop.
Stephan Bosch [Sun, 25 Mar 2018 18:03:47 +0000 (20:03 +0200)]
lib-http: http-server-request - Fix blocking payload input stream error handling.
Stephan Bosch [Tue, 20 Mar 2018 01:27:19 +0000 (02:27 +0100)]
lib-http: http-message parser - Improve error for invalid payload.
Add the textual error from the payload stream (chunked transfer).
Stephan Bosch [Mon, 19 Mar 2018 18:16:11 +0000 (19:16 +0100)]
lib-http: http-message parser - Refer to message payload rather than response payload in error message.
The message parser is used for both requests and responses.
Stephan Bosch [Thu, 27 Feb 2020 00:24:03 +0000 (01:24 +0100)]
lib-http: Restructure http-message-parser.c.
Reduce line length.
Stephan Bosch [Wed, 26 Feb 2020 23:24:54 +0000 (00:24 +0100)]
lib-http: Reformat http-message-parser.c.
Stephan Bosch [Thu, 27 Feb 2020 20:48:14 +0000 (21:48 +0100)]
lib-http: http-transfer-chunked - Don't implicitly finish the output stream upon o_stream_close().
Stephan Bosch [Sat, 9 Nov 2019 12:31:52 +0000 (13:31 +0100)]
lib-http: http-server-response - Properly finish the payload output stream asynchronously.
Payload output handling is finished only after the stream is finished and
flushed completely.
Stephan Bosch [Tue, 20 Mar 2018 19:42:17 +0000 (20:42 +0100)]
lib-http: http-client-request - Properly finish the payload output stream asynchronously.
Payload output handling is finished only after the stream is finished and
flushed completely.
Stephan Bosch [Tue, 20 Mar 2018 17:23:43 +0000 (18:23 +0100)]
lib-http: http-transfer-chunked - Make sending of the trailer chunk in ostream more reliable.
Use the new o_stream_finish() functionality.
Stephan Bosch [Tue, 20 Mar 2018 17:39:32 +0000 (18:39 +0100)]
lib-http: http-transfer-chunked - Add assertions to ensure that the chunk istream position is valid.
Stephan Bosch [Tue, 20 Mar 2018 19:58:30 +0000 (20:58 +0100)]
lib-http: Reformat http-client-connection.c.
Stephan Bosch [Tue, 12 Nov 2019 01:45:52 +0000 (02:45 +0100)]
lib-http: Reformat http-transfer-chunked.c.
Stephan Bosch [Thu, 5 Jul 2018 22:01:14 +0000 (00:01 +0200)]
lib-http: http-server-response - Prevent response content stream from finishing the connection output stream.
This is not supposed to happen ever, because the connection output stream needs
to be available for several responses. This was at some point a problem in some
of the test with the new ostream payload API.
Stephan Bosch [Thu, 5 Jul 2018 21:52:51 +0000 (23:52 +0200)]
lib-http: http-client-request - Prevent request content stream from finishing the connection output stream.
This is not supposed to happen ever, because the connection output stream needs
to be available for several requests. This was at some point a problem in some
of the test with the new ostream payload API.
Stephan Bosch [Fri, 22 Nov 2019 18:51:15 +0000 (19:51 +0100)]
lib: ostream - Use local variable for stream rather than pointer in o_stream_destroy().
Problem is that a destroy callback can mess with the pointer, leading to all kinds of trouble.
Aki Tuomi [Mon, 17 Feb 2020 09:10:46 +0000 (11:10 +0200)]
stats: Export sub-metrics for openmetrics
Aki Tuomi [Mon, 17 Feb 2020 11:19:16 +0000 (13:19 +0200)]
stats: stats-service-openmetrics.c - Fix whitespace formatting
Stephan Bosch [Sun, 17 Nov 2019 09:55:49 +0000 (10:55 +0100)]
stats: stats-service - Add support for OpenMetrics/Prometheus.
Stephan Bosch [Thu, 14 Nov 2019 23:34:32 +0000 (00:34 +0100)]
stats: Add stats exporter service infrastructure.
Stephan Bosch [Thu, 14 Nov 2019 23:32:00 +0000 (00:32 +0100)]
stats: Add HTTP server support.
Stephan Bosch [Thu, 14 Nov 2019 23:28:18 +0000 (00:28 +0100)]
stats: stats-metrics - Associate each metric with its corresponding metric settings.
Stephan Bosch [Thu, 14 Nov 2019 23:24:03 +0000 (00:24 +0100)]
stats: Make service startup time available as a global variable.
Stephan Bosch [Thu, 14 Nov 2019 22:57:19 +0000 (23:57 +0100)]
stats: Make metrics struct a global variable.
Stephan Bosch [Thu, 14 Nov 2019 23:08:15 +0000 (00:08 +0100)]
stats: Make settings available as a global variable.
Stephan Bosch [Thu, 14 Nov 2019 23:05:29 +0000 (00:05 +0100)]
stats: Create stats-common.h.
Stephan Bosch [Tue, 19 Nov 2019 00:34:06 +0000 (01:34 +0100)]
lib-http: http-server-request - Add http_server_request_fail_bad_method().
Stephan Bosch [Sun, 17 Nov 2019 14:01:26 +0000 (15:01 +0100)]
lib-http: http-url - Add http_url_init_authority_from().
Stephan Bosch [Thu, 14 Nov 2019 22:33:49 +0000 (23:33 +0100)]
stats: stats-settings - Add description setting for metrics.
Stephan Bosch [Fri, 8 Nov 2019 16:11:36 +0000 (17:11 +0100)]
lib-http: http-server - Implement support for dynamically adding resources.
Before, the application would get all requests through a single main callback
and the application was always responsible for mapping request targets to a
particular application-defined HTTP resource. Now, an application can receive
requests for a certain HTTP resource through a separately-registered resource
object, which allows dynamic configuration of server resources. This way, e.g.
a generic HTTP service with several separate 'drivers' or plugin support for an
HTTP service can be implemented more easily.
Stephan Bosch [Sun, 17 Nov 2019 13:28:37 +0000 (14:28 +0100)]
lib-http: http-server-request - Provide default response for OPTIONS * request.
Stephan Bosch [Sun, 17 Nov 2019 09:52:52 +0000 (10:52 +0100)]
lib-http: http-server-connection - Run request callback in new datastack frame.
Stephan Bosch [Fri, 8 Nov 2019 16:11:36 +0000 (17:11 +0100)]
lib-http: http-server-connection - Restructure request callback handling.
Move most of it to http-server-request.
Stephan Bosch [Fri, 8 Nov 2019 16:11:35 +0000 (17:11 +0100)]
lib-http: server: Replace http_*_debug() with e_debug().
Stephan Bosch [Fri, 8 Nov 2019 16:11:34 +0000 (17:11 +0100)]
lib-http: server: Replace http_*_error() with e_error().
Stephan Bosch [Fri, 8 Nov 2019 16:11:32 +0000 (17:11 +0100)]
lib-http: server: Replace i_error() with e_error().
Stephan Bosch [Fri, 8 Nov 2019 16:11:32 +0000 (17:11 +0100)]
lib-http: server: Remove redundant debug logging checks.
Stephan Bosch [Fri, 8 Nov 2019 16:11:31 +0000 (17:11 +0100)]
lib-http: server: Add support for event API.
Stephan Bosch [Mon, 11 Nov 2019 16:20:48 +0000 (17:20 +0100)]
lib-http: http-server-request - Make http_server_request_label() a normal function.
Stephan Bosch [Sat, 9 Nov 2019 08:36:56 +0000 (09:36 +0100)]
lib-http: Reformat http-server-response.c.
Stephan Bosch [Fri, 8 Nov 2019 16:11:31 +0000 (17:11 +0100)]
lib-http: Reformat http-server-request.c.
Stephan Bosch [Fri, 8 Nov 2019 16:11:30 +0000 (17:11 +0100)]
lib-http: Reformat http-server-connection.c.
Stephan Bosch [Fri, 8 Nov 2019 16:11:29 +0000 (17:11 +0100)]
lib-http: Reformat http-server-private.h.
Stephan Bosch [Fri, 8 Nov 2019 16:11:28 +0000 (17:11 +0100)]
lib-http: Reformat http-server.h.
Stephan Bosch [Fri, 17 Apr 2020 14:35:19 +0000 (16:35 +0200)]
Add generated dovecot.service file to .gitignore.
Timo Sirainen [Thu, 16 Apr 2020 12:59:24 +0000 (15:59 +0300)]
lib-index: Fix cache purging when index is being rebuilt
All the messages until trans->first_new_seq no longer exist after reset.
At best they cause confusion and are ignored. They could also point to
high UIDs that the rebuilding removes, causing further corruption errors.
Timo Sirainen [Thu, 16 Apr 2020 11:46:28 +0000 (14:46 +0300)]
lib-storage: index_index_rebuild_init() - Assert-crash if index isn't locked
Timo Sirainen [Thu, 16 Apr 2020 11:46:03 +0000 (14:46 +0300)]
lib-index: Add mail_index_lock_sync() and mail_index_unlock()
Juha-Petri Tyrkkö [Mon, 30 Mar 2020 06:48:32 +0000 (09:48 +0300)]
auth: Implement auth-worker-client per-command events.
Timo Sirainen [Wed, 1 Apr 2020 19:53:55 +0000 (22:53 +0300)]
lib-index: When flushing cache changes to disk, try to also write offsets to transaction log
This works as long as there aren't any newly created non-committed mails.
Timo Sirainen [Sun, 5 Apr 2020 15:36:44 +0000 (18:36 +0300)]
lib-index: Cache purging shouldn't always change YES decisions to TEMP
Previously every purging changed YES decision to be changed to TEMP.
This behaved rather badly if a cache file was purged twice within short
time period, because the clients might not have had time to access the
mailbox and change the decision back to YES. That in turn could have
dropped old mails' cached fields even though the client might still want
to use them. (A workaround for this has been to list all useful fields in
mail_always_cache_fields setting.)
The new behavior is to update the last_used field for a YES decision only
when the YES decision has been confirmed. If it's not confirmed for 30
days (mail_cache_unaccessed_field_drop) then its decision is changed to
TEMP on the next purge.
The new behavior also doubles the time when unaccessed field is dropped
from 30 days to 60 days (2*mail_cache_unaccessed_field_drop). This is
needed so that the field isn't dropped too early after YES -> TEMP
decision is changed.
Timo Sirainen [Sun, 5 Apr 2020 15:27:17 +0000 (18:27 +0300)]
lib-index: Split off mail_cache_purge_check_field()
Timo Sirainen [Sun, 5 Apr 2020 15:09:18 +0000 (18:09 +0300)]
lib-index: mail_cache_decision_state_update() - Minor refactoring
Simplifies the next commit.
Timo Sirainen [Sun, 5 Apr 2020 15:10:24 +0000 (18:10 +0300)]
lib-index: Split off mail_cache_update_last_used()
Timo Sirainen [Wed, 15 Apr 2020 12:16:24 +0000 (15:16 +0300)]
lib-oauth2: Fix linking unit tests
Reverses
0b3b67b848d7032ae94b14b3317ff0b6a45a4057 , which was wrong because
lib-http requires lib-master. Also libmaster now requires linking with
lib-auth.
Timo Sirainen [Wed, 25 Mar 2020 08:48:13 +0000 (10:48 +0200)]
auth: Fix potential timing attack in verying crypt() results
Probably impractical attack in any case, but lets do this just to be extra
safe.
Timo Sirainen [Wed, 25 Mar 2020 08:43:33 +0000 (10:43 +0200)]
lib-imap-urlauth: Fix potential timing attack in verifying the token
Timo Sirainen [Wed, 25 Mar 2020 08:42:40 +0000 (10:42 +0200)]
auth: DOVECOT-TOKEN mechanism - Fix potential timing attack in verying the token
Timo Sirainen [Tue, 7 Apr 2020 16:16:10 +0000 (19:16 +0300)]
lib: Add str_equals_timing_almost_safe()
Timo Sirainen [Sun, 5 Apr 2020 20:30:41 +0000 (23:30 +0300)]
lib-storage: Initialize new cache hdr.* fields with NO decision
Calling mail_cache_add() afterwards will change their decision to TEMP.
Or if it's not called, it probably wasn't wanted to be cached anyway.
Most importantly this change will cause mail_cache_decision event to be
triggered for these newly cached headers.
Timo Sirainen [Mon, 6 Apr 2020 11:34:42 +0000 (14:34 +0300)]
lib-storage: When sorting mails, mark all the sort program fields as "wanted"
Usually only the first field in the sort program is used, so this likely
doesn't make a big difference.
Also, this was already done in a different way for all header fields in the
program. However, the next commit will remove that way.
Timo Sirainen [Tue, 31 Mar 2020 19:23:05 +0000 (22:23 +0300)]
lib-index: Add test-mail-cache unit test
Timo Sirainen [Tue, 31 Mar 2020 18:45:38 +0000 (21:45 +0300)]
lib-index: Add test-mail-cache-purge unit test
Timo Sirainen [Fri, 3 Apr 2020 08:06:15 +0000 (11:06 +0300)]
lib-index: mailbox_cache_purge*() - Add reason string
Include the reason in the mail_cache_purge_* events also.
Timo Sirainen [Thu, 2 Apr 2020 21:22:45 +0000 (00:22 +0300)]
lib-index: Add mail_cache_record_corrupted event
Timo Sirainen [Thu, 2 Apr 2020 20:52:46 +0000 (23:52 +0300)]
lib-index: Add mail_cache_corrupted event
Timo Sirainen [Thu, 2 Apr 2020 21:18:28 +0000 (00:18 +0300)]
lib-index: If major_version or uoff_t size change in cache file, log error
These events really aren't expected, so it's better to clearly log errors
about them rather than silently delete the cache file.
Timo Sirainen [Thu, 2 Apr 2020 20:48:50 +0000 (23:48 +0300)]
lib-index: Merge mail_cache_reset() into mail_cache_unlink()
There are no external callers to mail_cache_reset(), and this simplifies the
code.
Timo Sirainen [Thu, 2 Apr 2020 21:07:23 +0000 (00:07 +0300)]
lib-index: mail_cache_set_seq_corrupted_reason() - Don't delete entire cache if transaction commit fails
It can only happen on I/O errors, which most likely means that there's no
disk space to write to transaction log. There's no reason to delete the
entire cache, since it might be expensive to recreate.
Timo Sirainen [Thu, 2 Apr 2020 20:45:49 +0000 (23:45 +0300)]
lib-index: Add mail_cache_decision_changed event
Timo Sirainen [Thu, 2 Apr 2020 20:38:23 +0000 (23:38 +0300)]
lib-index: Add mail_cache_purge_drop_field event
Timo Sirainen [Thu, 2 Apr 2020 20:12:00 +0000 (23:12 +0300)]
lib-index: Add mail_cache_purge_started/finished events
Timo Sirainen [Tue, 31 Mar 2020 12:21:28 +0000 (15:21 +0300)]
lib-index: Log a warning if cache purging causes changes to be lost
Timo Sirainen [Thu, 2 Apr 2020 20:25:59 +0000 (23:25 +0300)]
lib-index: Add mail_cache.event with a log prefix and mail-cache category
Timo Sirainen [Sat, 4 Apr 2020 09:44:02 +0000 (12:44 +0300)]
lib-index: Rename "index" event category to "mail-index"
It's a bit too ambiguous to call it just "index" since we have so many
different ones.
Timo Sirainen [Thu, 2 Apr 2020 21:41:55 +0000 (00:41 +0300)]
lib-storage: Use mailbox.event as parent to mail_index
The index lives longer than the struct mailbox, which is a bit confusing.
In some cases the index could even be used for a different mailbox name
(symlink/alias), in which case the event's mailbox name wouldn't be exactly
correct. However, these downsides are still preferable to not inheriting
from the mailbox event, since then there is no mailbox name.
Timo Sirainen [Tue, 31 Mar 2020 12:20:33 +0000 (15:20 +0300)]
lib-index: When cache purging causes changes to be lost, don't update deleted_record_count
The new file that purging created doesn't have any of these deleted records
anymore.
Timo Sirainen [Tue, 31 Mar 2020 12:03:16 +0000 (15:03 +0300)]
lib-storage: Rename mail_cache_compress_* settings to mail_cache_purge_*
The old settings are still recognized by the old-set-parser.