Commit Graph
100 Commits
Author SHA1 Message Date
link2xt 80af012962 fix: set correct sent_timestamp for saved outgoing messages 2025-08-07 07:58:53 +00:00
link2xt b431206ede fix: allow receiving empty files 2025-08-06 13:33:04 +00:00
link2xt 08bb0484eb chore(release): prepare for 2.10.0 2025-08-04 22:33:59 +00:00
link2xt b0b7337f5a chore: upgrade async-imap to 0.11.1 2025-08-04 21:42:28 +00:00
link2xt 3a1370e174 chore(release): prepare for 2.9.0 2025-07-31 18:57:58 +00:00
link2xt ba76944d75 fix: display correct timer value for ephemeral timer changes
The timer change should not disappear,
but should display correct timer change.
2025-07-31 15:00:08 +00:00
link2xt d80b749dec chore(release): prepare for 2.8.0 2025-07-28 19:31:43 +00:00
link2xt 039a8b7c36 fix: lookup self by address if there is no fingerprint or gossip 2025-07-28 19:18:07 +00:00
link2xt b9183fe5eb chore(release): prepare for 2.7.0 2025-07-26 22:49:44 +00:00
link2xt 4e47ebd5fc test: fix flaky test_webxdc_resend 2025-07-24 17:47:19 +00:00
link2xt 7f3648f8ae chore(release): prepare for 2.5.0 2025-07-22 14:21:07 +00:00
link2xt 49fc258578 fix: do not ignore errors in add_flag_finalized_with_set 2025-07-22 14:17:30 +00:00
link2xt 0c51b4fe41 docs(STYLE.md): prefer try_next() over next() 2025-07-22 12:33:37 +00:00
link2xt 46b275bfab chore(release): prepare for 2.4.0 2025-07-21 15:08:00 +00:00
link2xt 25f44c517a chore: update async-imap to 0.11.0 2025-07-21 15:03:15 +00:00
link2xt cac04f8ee4 refactor: use try_next() when processing FETCH responses 2025-07-21 13:55:02 +00:00
link2xt 45d8566ec0 fix: do not ignore errors when draining FETCH responses 2025-07-21 13:55:02 +00:00
link2xt 29a98ba13b fix: update tokio-io-timeout to 1.2.1
tokio-io-timeout 1.2.0 used previously
did not reset the timeout when returning
timeout error. This resulted
in infinite loop spamming
the log with messages that look like this and using 100% CPU:

    Read error on stream 192.168.1.20:993 after reading 9118 and writing 1036 bytes: timed out.
    Read error on stream 192.168.1.20:993 after reading 9118 and writing 1036 bytes: timed out.
    Read error on stream 192.168.1.20:993 after reading 9118 and writing 1036 bytes: timed out.
    Read error on stream 192.168.1.20:993 after reading 9118 and writing 1036 bytes: timed out.
    Read error on stream 192.168.1.20:993 after reading 9118 and writing 1036 bytes: timed out.
    Read error on stream 192.168.1.20:993 after reading 9118 and writing 1036 bytes: timed out.

Normally these messages should be separated by at least 1 minute timeout.

The reason for infinite loop is not figured out yet,
but this change should at least fix 100% CPU usage.

See <https://github.com/sfackler/tokio-io-timeout/issues/13>
for the bugreport and
<https://github.com/sfackler/tokio-io-timeout/pull/14>
for the bugfix.
2025-07-20 10:53:35 +00:00
link2xt e3973f6448 chore(release): prepare for 2.3.0 2025-07-19 11:58:13 +00:00
link2xt 7b41425fe4 fix: save peer address for LoggingStream early
Socket may lose peer address when it is disconnected from
the server side. In this case debug_assert! failed
for me when running the core in debug mode on desktop.
To avoid the case of peer_addr not being available,
we now store it when LoggingStream is created.
2025-07-19 10:58:35 +00:00
l a2df29515a feat: log the number of read/written bytes on IMAP stream read error (#6924) 2025-07-17 20:01:16 +00:00
link2xt 6df1d165dd feat: log when background fetch of all accounts finishes successfully 2025-07-17 15:46:46 +00:00
link2xt a0f6bdffeb chore(release): prepare for 2.2.0 2025-07-14 18:43:03 +00:00
link2xt e6fd52afff fix: always prefer the last header
Headers are normally added at the top of the message,
e.g. when forwarding new `Received` headers are
added at the top.

When headers are protected with DKIM-Signature
and oversigning is not used,
forged headers may be added on top
so headers from the top are generally less trustworthy.

This is tested with `test_take_last_header`,
but so far last header was only preferred
for known headers. This change extends
preference of the last header to all headers.
2025-07-14 14:57:52 +00:00
link2xt d45ec7f34d feat: advance next UID even if connection fails while fetching
Connection sometimes fails while processing FETCH
responses. In this case `fetch_new_messages` exits early
and does not advance next expected UID even if
some messages were processed.

This results in prefetching the same messages
after reconnection and log messages
similar to
"Not moving the message ab05c85a-e191-4fd2-a951-9972bc7e167f@localhost that we have seen before.".

With this change we advance next expected UID
even if `fetch_new_messages` returns a network error.
2025-07-13 16:32:26 +00:00
link2xt 402e42f858 chore(release): prepare for 2.1.0 2025-07-11 22:56:57 +00:00
link2xt fbae0739a6 chore(cargo): update cordyceps from 0.3.2 to 0.3.4 2025-07-11 22:07:27 +00:00
link2xt 5ab107866a feat: log emitted logging events with tracing 2025-07-10 00:27:24 +00:00
link2xt 192a6a2b9d chore(release): prepare for 2.0.0 2025-07-09 18:31:32 +00:00
link2xt ab4cb01065 fix: do not try to lookup key-contacts for unencrypted 1:1 messages 2025-07-09 17:02:31 +00:00
link2xt 661a8864b9 test: add a test reproducing chat assignment bug 2025-07-09 17:02:31 +00:00
link2xt 67f00fbb84 refactor: remove check that is always false
The check for chat_id.is_some() is inside the `else` branch
of a pattern-matching `if` that looks for `Some` pattern.
2025-07-09 17:02:30 +00:00
link2xt d9b361f066 docs: remove outdated comment that says MDNs are unencrypted 2025-07-06 22:25:15 +00:00
link2xt 94e75cb3b8 test: add online test for read receipts 2025-07-06 22:25:15 +00:00
link2xt c7fb64e2f3 fix: send Autocrypt header in MDNs
Otherwise MDNs are attributed to address-contacts
rather than key-contacts.
2025-07-06 22:25:15 +00:00
link2xt ebddabe958 api(deltachat-rpc-client): add Message.get_read_receipts() 2025-07-06 22:25:15 +00:00
link2xt ee8364913b fix: allow to scan invite links before configuration 2025-06-30 21:27:20 +00:00
link2xt 2ee3675ba2 ci: update Rust to 1.88.0 2025-06-30 18:15:29 +00:00
link2xt 53ebf2ca27 feat: increase event channel size from 1000 to 10000
SQL migration to key contacts generates a lot of events,
and they are dropped in desktop logs because it does
not read the events fast enough.
This at least reduces the number of dropped messages.
2025-06-30 12:25:57 +00:00
link2xt 5c3de759d3 refactor: upgrade to Rust 2024 2025-06-28 17:07:59 +00:00
link2xt 0ffd4d9f87 fix: wait for scheduler tasks shutdown in parallel 2025-06-28 17:05:32 +00:00
416131b4a2 feat: key-contacts
This change introduces a new type of contacts
identified by their public key fingerprint
rather than an e-mail address.

Encrypted chats now stay encrypted
and unencrypted chats stay unencrypted.
For example, 1:1 chats with key-contacts
are encrypted and 1:1 chats with address-contacts
are unencrypted.
Groups that have a group ID are encrypted
and can only contain key-contacts
while groups that don't have a group ID ("adhoc groups")
are unencrypted and can only contain address-contacts.

JSON-RPC API `reset_contact_encryption` is removed.
Python API `Contact.reset_encryption` is removed.
"Group tracking plugin" in legacy Python API was removed because it
relied on parsing email addresses from system messages with regexps.

Co-authored-by: Hocuri <hocuri@gmx.de>
Co-authored-by: iequidoo <dgreshilov@gmail.com>
Co-authored-by: B. Petersen <r10s@b44t.com>
2025-06-26 14:07:39 +00:00
link2xt 7ac04d0204 fix: remove display name from get_info()
Display name is rarely needed for debugging,
so there is no need to include it in the logs.
Display name is even already listed in `skip_from_get_info`,
but the test only allowed the values to be skipped
without checking that they are always skipped.
2025-06-25 17:01:51 +00:00
link2xt a40337f4e0 chore(release): prepare for 1.160.0 2025-06-22 12:26:53 +00:00
link2xt b45d9aa464 chore: update rusqlite to 0.36.0 2025-06-21 13:46:00 +00:00
link2xt 48b2e2bc1f chore: sort the list in deny.toml 2025-06-21 13:46:00 +00:00
link2xt 545007aca5 api!: make logging macros private 2025-06-21 11:01:25 +00:00
link2xt 07ce319839 api!(jsonrpc): remove webxdc info from MessageObject 2025-06-18 11:48:32 +00:00
link2xt 0d36c85568 chore: disable some Python lints introduced in ruff 0.12 2025-06-18 10:19:48 +00:00
link2xt 139fbfae85 chore: nightly clippy fixes 2025-06-18 10:19:48 +00:00
link2xt a8a7cec376 refactor: use CancellationToken instead of a 1-message channel 2025-06-11 14:28:24 +00:00
link2xt 15092407ea build: enable async-native-tls/vendored feature
OpenSSL is vendored, but because of rusqlite feature
transitively enabling vendoring feature.
This change makes vendoring explicit
even if we disable SQLCipher in the future.
2025-06-09 22:17:52 +00:00
link2xt 026ddbf9f1 build: upgrade parking_lot to 0.12.4 2025-06-05 20:15:37 +00:00
link2xt 628b178076 build: update cargo-bolero from 0.8.0 to 0.13.3
New `fuzz` profile is added
because cargo-bolero now requires it and uses
by default, while `--release` option is removed.

Instructions for running AFL are removed from the README
because it requires some system reconfiguration
and I did not test it this time.
2025-06-05 16:15:01 +00:00
link2xt 407ec1311e docs: add more code style guide references 2025-06-04 19:03:51 +00:00
link2xt b9667aae6b feat: better error for quoting a message from another chat 2025-06-04 18:28:35 +00:00
link2xt becb83faf1 fix: create group chats unprotected on verification error 2025-05-31 12:54:44 +00:00
link2xt 32263b4574 fix: ignore verification error if the chat is not protected yet
If we receive a message from non-verified contact
in a non-protected chat with a Chat-Verified header,
there is no need to upgrade the chat
to verified and display an error.

If it was an attack, an attacker could
just not send the Chat-Verified header.
Most of the time, however, it is just
message reordering.
2025-05-31 12:54:44 +00:00
link2xt fd3e48dcb2 chore: run npm run prettier:fix 2025-05-29 15:13:42 +00:00
link2xt 69573cd735 chore: update deltachat-jsonrpc JS dependencies 2025-05-29 15:13:42 +00:00
link2xt 42975b2ff3 chore: expect clippy::large_enum_variant 2025-05-29 11:58:11 +00:00
link2xt c7063c00f7 ci: use installed toolchain to lint Rust 2025-05-29 11:58:11 +00:00
link2xt 89df9536e9 fix: reduce the scope of the last_full_folder_scan lock in scan_folders
This makes it easier to ensure that holding this lock
does not result in deadlocks.
2025-05-28 15:46:01 +00:00
link2xt adcc8a919c build: update Doxygen config and layout file 2025-05-26 18:19:26 +00:00
link2xt 37dc1f5ca0 api!: deprecate DC_GCL_VERIFIED_ONLY 2025-05-20 16:14:43 +00:00
link2xt a68ddab703 chore: apply beta clippy fixes 2025-05-20 14:09:07 +00:00
link2xt 877f873910 feat: add more IMAP logging
E.g. log when the folder is selected.
2025-05-19 08:25:05 +00:00
link2xt 53fa0147ae docs: update Imap.prepare() documentation 2025-05-19 08:25:05 +00:00
link2xt 7655c5b150 docs: update Imap.connect() documentation 2025-05-19 08:25:05 +00:00
link2xt 235b625f71 refactor: remove explicit lock drop at the end of scope 2025-05-19 08:25:05 +00:00
link2xt ab3cd6a8f7 chore(deny.toml): add exception for deplicate spin 0.9.8 dependency 2025-05-16 04:14:27 +00:00
link2xt 3abf2b5227 build: increase MSRV to 1.85.0 2025-05-16 03:03:58 +00:00
link2xt 0d5d7032fe build: nix flake update nixpkgs 2025-05-16 03:03:58 +00:00
link2xt c48b04ab99 ci(nix): test build on macOS without cross-compilation 2025-05-16 03:03:58 +00:00
link2xt eaa30dbe21 build: nix flake update fenix 2025-05-16 03:03:58 +00:00
link2xt bb0f812f71 ci: update Rust to 1.87.0 2025-05-16 03:03:58 +00:00
link2xt 4c287075da fix: do not allow chat creation if decryption failed 2025-05-15 18:02:19 +00:00
link2xt 09d18f9097 test: fixup for test_restore_backup_after_60_days 2025-05-15 18:02:19 +00:00
link2xt 079260a7cf chore: update async-smtp to 0.10.2 2025-05-13 16:18:25 +00:00
link2xt fdec78c092 chore: remove duplicate miniz_oxide dependency 2025-05-13 15:25:56 +00:00
link2xt 259ffef0bb chore(release): prepare for 1.159.4 2025-05-13 14:56:09 +00:00
l 6661a0803e chore: update iroh from 0.33.0 to 0.35.0 (#6687) 2025-05-12 20:33:21 +00:00
link2xt c1471bdbd9 docs: add missing documentation to deltachat-rpc-client 2025-05-12 17:39:50 +00:00
link2xt 8fb3a7514e fix: replace FuturesUnordered from futures with JoinSet from tokio
FuturesUnordered is likely buggy and iroh previously switched
to JoinSet in <https://github.com/n0-computer/iroh/pull/1647>.
We also have reports with logs of background_fetch getting
stuck so apparently task cancellation after timeout does not work
as intended with FuturesUnordered.
2025-05-10 17:26:05 +00:00
link2xt 83bc497f0d chore(release): prepare for 1.159.3 2025-04-24 13:44:06 +00:00
link2xt 990a13fd96 ci: use ubuntu-latest for @deltachat/jsonrpc-client publishing
Ubuntu 20.04 runner is removed.
2025-04-24 13:39:50 +00:00
link2xt 29b84424f4 chore(release): prepare for 1.159.2 2025-04-23 23:08:07 +00:00
link2xt 4168985869 chore: update yerpc to 0.6.4 2025-04-16 22:57:07 +00:00
link2xt 1ea8647018 test: test that key of the recipient is gossiped in 1:1 chats
It is needed for multi-device setups.
2025-04-16 12:00:47 +00:00
link2xt 1722cb8851 test: fix mismatch between the contact and the account in securejoin tests 2025-04-13 05:48:58 +00:00
link2xt 0e3277bc5a chore(release): prepare for 1.159.1 2025-04-12 03:13:35 +00:00
link2xt 9f5e608c61 feat: track gossiping per (chat, fingerprint) pair
This change simplifies
updating the gossip timestamps
when we receive a message
because we only need to know
the keys received in Autocrypt-Gossip
header and which chat the message is
assigned to.
We no longer need to iterate
over the member list.

This is a preparation
for PGP contacts
and member lists that contain
key fingerprints rather than
email addresses.

This change also removes encryption preference
from Autocrypt-Gossip header.
It SHOULD NOT be gossiped
according to the Autocrypt specification
and we ignore encryption preference anyway
since 1.157.0.

test_gossip_optimization is removed
because it relied on a per-chat gossip_timestamp.
2025-04-12 02:51:11 +00:00
link2xt 0b82b42128 build: increase MSRV to 1.82.0
This allows using Option::is_none_or()
which is only available since 1.82.0.
2025-04-12 02:51:11 +00:00
link2xt b4828c251f docs: MimeFactory.member_timestamps has the same order as To: rather than RCPT TO: 2025-04-11 18:35:56 +00:00
link2xt 7a4f0eed23 test: encrypt test_remove_member_bcc 2025-04-11 14:02:09 +00:00
link2xt 54a6b0efcb test: encrypt test_subject_in_group() 2025-04-11 14:02:09 +00:00
link2xt 3e8987b460 test: port test_delete_deltachat_folder to JSON-RPC 2025-04-09 13:28:26 +00:00
link2xt 634cbd14f0 fix: restart I/O when mvbox_move setting is changed
When the setting is enabled,
new IMAP loop should be started.
2025-04-08 23:33:31 +00:00
link2xt 31cf663f8b api(deltachat-rpc-client): add Account.add_transport() 2025-04-08 21:51:54 +00:00
link2xt 175145969c fix: never send Autocrypt-Gossip in broadcast lists
Broadcast lists are encrypted since 1.159.0,
but Autocrypt-Gossip was not disabled.
As Autocrypt-Gossip contains the email address
and the key of the recipient, it should
not be sent to broadcast lists.
2025-04-08 21:50:25 +00:00