[dovecot/core] 9dc6c1: lib-http: client: Explicitly destroy the response ...

GitHub noreply at github.com
Fri Jun 16 09:30:13 EEST 2017


  Branch: refs/heads/master-2.2
  Home:   https://github.com/dovecot/core
  Commit: 9dc6c1c26c80e85fbada13c314ab748305e36a06
      https://github.com/dovecot/core/commit/9dc6c1c26c80e85fbada13c314ab748305e36a06
  Author: Stephan Bosch <stephan.bosch at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/lib-http/http-client-connection.c
    M src/lib-http/http-client-private.h
    M src/lib-http/http-client-request.c

  Log Message:
  -----------
  lib-http: client: Explicitly destroy the response payload timeout stream when the request is destroyed while receiving payload.

This way, the timeout is stopped.
This caused ioloop panics.


  Commit: 4d14871383473b237b2501d062a9be6887b1f93c
      https://github.com/dovecot/core/commit/4d14871383473b237b2501d062a9be6887b1f93c
  Author: Stephan Bosch <stephan.bosch at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/lib-http/http-client-connection.c

  Log Message:
  -----------
  lib-http: client: When a request is destroyed prematurely during payload input, consider the payload stream destroyed and act accordingly.

The application may hold a reference to the payload stream still, and it may be difficult to prevent that.
This causes lib-http to keep waiting for the payload to be destroyed.
When nothing else is going on, the current ioloop may then become empty, which caused the familiar assert failure.


  Commit: 6266ce1d9e5c8c5b8f7bfde28255f799ad8fe000
      https://github.com/dovecot/core/commit/6266ce1d9e5c8c5b8f7bfde28255f799ad8fe000
  Author: Stephan Bosch <stephan.bosch at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/lib-http/http-client-host.c
    M src/lib-http/http-client-private.h
    M src/lib-http/http-client-queue.c

  Log Message:
  -----------
  lib-http: client: Only drop queued requests when a DNS lookup fails; not also the ones that are already in progress.


  Commit: e9799f25f0d4e1f5c70c47ce95b23a6d8bc987bd
      https://github.com/dovecot/core/commit/e9799f25f0d4e1f5c70c47ce95b23a6d8bc987bd
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/auth/auth-request.c

  Log Message:
  -----------
  auth: Don't lose all forward_ fields if the first passdb lookup fails.


  Commit: 2e2048d874fdb1887026a894e28ef975803f110d
      https://github.com/dovecot/core/commit/2e2048d874fdb1887026a894e28ef975803f110d
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/pop3/main.c
    M src/pop3/pop3-client.c
    M src/pop3/pop3-client.h

  Log Message:
  -----------
  pop3: move pop3 session locking out of client_create

As a result, we can directly return the client structure (instead of
passing it back via a _r arg).

This makes the pop3 client_create look more like the imap version.


  Commit: 914c9cb239f0f9b7acc501299a34792e66a05d1f
      https://github.com/dovecot/core/commit/914c9cb239f0f9b7acc501299a34792e66a05d1f
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/pop3/main.c

  Log Message:
  -----------
  pop3: rename login_client_connected() client arg to login_client

This makes the next commit cleaner.


  Commit: 848ca852ae9dbef3bdb5b17526e4cdcf96249ab2
      https://github.com/dovecot/core/commit/848ca852ae9dbef3bdb5b17526e4cdcf96249ab2
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/pop3/main.c

  Log Message:
  -----------
  pop3: client_create_from_input should return the client struct

This makes the code more similar to imap's, making subsequent changes
easier.


  Commit: 3172b06472fd9becb7a2d847efad0fdb67c3aa88
      https://github.com/dovecot/core/commit/3172b06472fd9becb7a2d847efad0fdb67c3aa88
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/pop3/main.c

  Log Message:
  -----------
  pop3: client_create_from_input shouldn't process input

This makes the pop3 code resemble the imap code more.  Making the subsequent
changes easier.


  Commit: 9a084241191dc5cf69a64b6286e78be77a6f60b2
      https://github.com/dovecot/core/commit/9a084241191dc5cf69a64b6286e78be77a6f60b2
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/pop3/main.c
    M src/pop3/pop3-client.c

  Log Message:
  -----------
  pop3: initialize namespaces explicitly

(instead of relying on mail user initialization to instantiate them for
us)


  Commit: 7f3ca7e662531c304d922546f987530f5d837147
      https://github.com/dovecot/core/commit/7f3ca7e662531c304d922546f987530f5d837147
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/pop3/main.c

  Log Message:
  -----------
  pop3: send back auth reply sooner

If possible (i.e., pop3_lock_session=no), we can send back the OK
response earlier.


  Commit: 9308ca61533174873b583c4c89f7f5000bd9b221
      https://github.com/dovecot/core/commit/9308ca61533174873b583c4c89f7f5000bd9b221
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/plugins/mail-crypt/mail-crypt-acl-plugin.c

  Log Message:
  -----------
  mail-crypt-acl: Fix assert-crash due to missing namespace initialization

This was broken by e031d9aaae59a9f79710dc1138b76b69272615a3.


  Commit: ca42174e6556b3597ff4702f1df7b5af01e2e82f
      https://github.com/dovecot/core/commit/ca42174e6556b3597ff4702f1df7b5af01e2e82f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/plugins/push-notification/push-notification-plugin.c

  Log Message:
  -----------
  push-notification: Switch to main ioloop while calling drivers' commit callbacks

There aren't any guarantees what ioloop happens to be active at the time
the commit is called. The active ioloop can also be destroyed early on,
which can cause an I/O leak and crashes later on.


  Commit: ffc73186695a334a9b08be0e6f68aa922016a68e
      https://github.com/dovecot/core/commit/ffc73186695a334a9b08be0e6f68aa922016a68e
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/lib/istream-seekable.c

  Log Message:
  -----------
  lib: istream-seekable - Fix reading when parent stream's content is larger than max_buffer_size

When writing the parent stream to fd and trying to read it back, it would
try to enforce the max_buffer_size and fail with:

istream-seekable: Couldn't read back in-memory input ...: buffer full

But since the data was already in buffer, istream-seekable shouldn't try to
enforce it at this point anymore.


  Commit: d8c688a9889135ffa5ac9fe9043a227447a57727
      https://github.com/dovecot/core/commit/d8c688a9889135ffa5ac9fe9043a227447a57727
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/lib-mail/istream-header-filter.c
    M src/lib-mail/test-istream-header-filter.c

  Log Message:
  -----------
  lib-mail: istream-header-filter - Fix HEADER_FILTER_ADD_MISSING_EOH with empty input

The result for "" should be "\n", not "\n\n". The second "\n" would belong
to the mail body.

This fixes calculating hashes for incremental dsync when mail didn't have
Date or Message-ID headers, resulting in e.g.:

Warning: Deleting mailbox 'INBOX': UID=1 already exists locally for a different mail: Headers hashes don't match (e1c06d85ae7b8b032bef47e42e4c08f9 vs 68b329da9893e34099c7d8ad5cb9c940)


  Commit: 5c92541d8f8d9308faeacbd60be34253031d632c
      https://github.com/dovecot/core/commit/5c92541d8f8d9308faeacbd60be34253031d632c
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-06-16 (Fri, 16 Jun 2017)

  Changed paths:
    M src/lib-index/mail-cache-transaction.c

  Log Message:
  -----------
  lib-index: Fix cache lookups from uncommitted transactions with in-memory indexes

This especially fixes mail_get_header_stream() with imapc and
imapc_features=fetch-headers, because it works by first fetching the
specific headers and putting them to the cache transaction, then later on
relying on index_mail_get_header_stream() to get them from the transaction.
Before this fix they wouldn't be found, which triggered another unnecessary
FETCH BODY.PEEK[HEADER].


Compare: https://github.com/dovecot/core/compare/3c93c5e736d4...5c92541d8f8d


More information about the dovecot-cvs mailing list