Commit Graph
100 Commits
Author SHA1 Message Date
link2xt f03ffa7641 refactor: pass address to moz_autoconfigure() instead of LoginParam 2024-08-08 00:15:08 +00:00
link2xt b44185948d refactor: remove param_addr_urlencoded argument from get_autoconfig()
It can be calculated inside the function.
2024-08-08 00:15:08 +00:00
link2xt 6b4532a08e refactor: merge imap_certificate_checks and smtp_certificate_checks 2024-08-07 18:08:39 +00:00
link2xt 92685189aa ci: update EmbarkStudios/cargo-deny-action action
v1 is not going to be updated to cargo-deny 0.16.0
because of breaking changes in cargo-deny.
2024-08-06 14:11:56 +00:00
link2xt 3b76622cf1 chore: fix typo s/webdxc/webxdc/ 2024-08-06 05:53:54 +00:00
link2xt c5a524d3c6 refactor: derive Default for CertificateChecks 2024-08-06 02:32:55 +00:00
link2xt 17eb85b9cd build: downgrade Tokio to 1.38 to fix Android compilation 2024-08-05 17:10:11 +00:00
link2xt 3c688360fb chore(release): prepare for 1.142.3 2024-08-04 04:11:52 +00:00
link2xt 9f220768c2 build: do not disable "vendored" feature in the workspace
This fixes `nix build .#python-docs`
2024-08-04 03:17:42 +00:00
link2xt fd183c6ee5 chore: remove direct "quinn" dependency 2024-08-04 02:31:42 +00:00
link2xt 9788fb16e8 chore(cargo): update rusqlite and libsqlite3-sys
SQLCipher does not allow passing empty key
since version v4.5.5,
so PRAGMA calls are wrapped into if's.
2024-08-03 23:02:08 +00:00
link2xt 39ed587959 Revert "chore(cargo): update rusqlite"
This reverts commit 1b92d18777.
2024-08-03 19:19:55 +00:00
link2xt c4327a0558 Fix cargo warnings about default-features
Otherwise cargo emits these warnings:
warning: .../deltachat-core-rust/deltachat-ffi/Cargo.toml: `default-features` is ignored for deltachat, since `default-features` was not specified for `workspace.dependencies.deltachat`, this could become a hard error in the future
warning: .../deltachat-core-rust/deltachat-rpc-server/Cargo.toml: `default-features` is ignored for deltachat, since `default-features` was not specified for `workspace.dependencies.deltachat`, this could become a hard error in the future
warning: .../deltachat-core-rust/deltachat-rpc-server/Cargo.toml: `default-features` is ignored for deltachat-jsonrpc, since `default-features` was not specified for `workspace.dependencies.deltachat-jsonrpc`, this could become a hard error in the future
2024-08-03 19:08:47 +00:00
link2xt 1b92d18777 chore(cargo): update rusqlite 2024-08-03 19:08:29 +00:00
link2xt a67503ae4a chore: remove backtrace dependency
It is not used directly by `deltachat` crate.
2024-08-02 23:06:30 +00:00
link2xt c54f39bea0 chore: remove sha2 dependency
It is not used since ce6ec64069
2024-08-02 23:06:30 +00:00
link2xt da50d682e1 chore(release): prepare for 1.142.2 2024-08-02 17:05:43 +00:00
link2xt 094d310f5c feat: sort DNS results by successful connection timestamp (#5818) 2024-08-02 16:53:16 +00:00
link2xt 76c032a2c4 fix: reset configured_provider on reconfiguration 2024-08-02 16:31:07 +00:00
link2xt ee7a7a2f9d fix: fix compilation on iOS 2024-08-02 15:22:19 +00:00
link2xt 21be85071a feat: try only the full email address if username is unspecified
Previously Delta Chat tried to use local part of email address as well.
This configuration is very uncommon,
but trying it doubled the time of configuration try
in the worst case, e.g. when the password is typed in incorrectly.
2024-08-01 17:08:23 +00:00
link2xt 0324884124 build: use workspace dependencies to make cargo-deny 0.15.1 happy 2024-07-31 16:45:12 +00:00
link2xt ad225b12c2 chore(cargo): update bytemuck from 0.14.3 to 0.16.3
Version 0.14.3 is yanked.
2024-07-31 05:20:09 +00:00
link2xt 0dd5e5ab7d fix: do not reset is_chatmail config on failed reconfiguration
Instead, always set it at the end of successful configuration.
2024-07-31 02:36:36 +00:00
link2xt 490f41cda8 fix: await the tasks after aborting them 2024-07-30 20:31:22 +00:00
link2xt c163438eaf chore(release): prepare for 1.142.1 2024-07-30 15:40:06 +00:00
link2xt ef925b0948 refactor: move DNS resolution into IMAP and SMTP connect code 2024-07-30 02:12:05 +00:00
link2xt 0fceb270ca fix: explicitly close the database on account removal 2024-07-30 00:22:03 +00:00
link2xt 4ec5d12213 refactor(imap): unify IMAP connection setup in Client::connect()
All functions like Client::connect_secure() are now private
and every new connection is established in Client::connect().
2024-07-29 15:16:40 +00:00
link2xt d9c0e47581 refactor(smtp): unify SMTP connection setup between TLS and STARTTLS
Single function smtp::connect::connect_stream
returns a stream of a single `dyn` type
that can be a TLS, STARTTLS or plaintext
connection established over SOCKS5 or directly.
2024-07-29 15:16:40 +00:00
link2xt 8ec4a8ad46 refactor: replace {IMAP,SMTP,HTTP}_TIMEOUT with a single constant
This change also increases HTTP timeout from 30 seconds to 60 seconds.
2024-07-29 15:16:40 +00:00
link2xt 40d355209b refactor: pass single ALPN around instead of ALPN list
This way there is always exactly one ALPN ("imap" or "smtp").
2024-07-29 15:16:40 +00:00
link2xt 14d57e780b feat: report first error instead of the last on connection failure
First result has higher priority
as it is the one prioritized by DNS
or used recently, while the last
tried server may never work at all.
2024-07-27 23:00:05 +00:00
link2xt 76a43c8de6 feat: try next DNS resolution result if TLS setup fails
Previously Delta Chat tried all DNS resolution results
in sequence until TCP connection is established successfully,
then tried to establish TLS on top of the TCP connection.
If establishing TLS fails, the whole
connection establishment procedure failed
without trying next DNS resolution results.

In particular, in a scenario
where DNS returns incorrect result
pointing e.g. to a server
that listens on the TCP port
but does not have correpsponding TLS certificate,
Delta Chat now will fall back to the cached result
and connect successfully.
2024-07-27 23:00:05 +00:00
link2xt b807435c42 refactor: add net/dns submodule 2024-07-27 23:00:05 +00:00
link2xt 3b040fd4b5 ci: update Rust to 1.80.0 2024-07-26 23:57:21 +00:00
link2xt b9b9ed197e chore(cargo): update iroh from 0.20.0 to 0.21.0 2024-07-26 23:07:59 +00:00
link2xt c4efe59a12 chore(cargo): update time from 0.3.34 to 0.3.36 2024-07-26 16:21:20 +00:00
link2xt d46f53a004 fix(smtp): use DNS cache for implicit TLS connections
load_cache argument to connect_tcp() should only be false
if strict TLS checks are disabled or TLS is not used.
2024-07-25 01:25:49 +00:00
link2xt 5fb5fd4318 chore(release): prepare for 1.142.0 2024-07-23 05:02:53 +00:00
link2xt a3cb58484f feat: use [...] for protected subject
This subject is going to be standardized in
<https://datatracker.ietf.org/doc/draft-ietf-lamps-header-protection/>
and is already used in K-9 Mail:
<https://github.com/thunderbird/thunderbird-android/pull/8014>
2024-07-23 04:50:40 +00:00
link2xt a710c034e4 feat: do not show the address in invite QR code SVG
Addresses take space and sometimes
do not fit. We generally want
to deemphasize addresses in the UI,
especially randomized chatmail
addresses.
2024-07-22 22:39:48 +00:00
link2xt 7f3e8f9796 feat: promote fallback DNS results to cached on successful use
For hardcoded built-in DNS results
there is no cache entry in `dns_cache` table
so they cannot be prioritized if DNS resolution
never returned these results yet.
If there is no entry, a new one should be created.
SQL UPSERT does this.
2024-07-22 20:08:07 +00:00
link2xt 837311abce chore(cargo): update image crate to 0.25.2
This version deprecated `image::io::Reader`,
requires changes to avoid warnings.
2024-07-22 20:02:58 +00:00
link2xt 8f400dda85 feat: use custom DNS resolver for HTTP(S) 2024-07-21 23:04:53 +00:00
link2xt 2a605b93cd test: add test for get_http_response JSON-RPC call 2024-07-21 23:04:53 +00:00
link2xt 87a45e88dc fix: correct copy-pasted DCACCOUNT parsing errors message
Apparently error message was copy-pasted from DCWEBRTC handling code.
2024-07-20 12:26:13 +00:00
link2xt d6d90db957 feat: new BACKUP2 transfer protocol
New protocol streams .tar into iroh-net
stream without traversing all the files first.
Reception over old backup protocol
is still supported to allow
transferring backups from old devices
to new ones, but not vice versa.
2024-07-19 03:16:57 +00:00
link2xt 307d11f503 api(deltachat-jsonrpc): add pinned property to FullChat and BasicChat 2024-07-17 10:12:39 +00:00
link2xt 73f527e772 fix: randomize avatar blob filenames to work around caching 2024-07-15 22:48:39 +00:00
link2xt 0f26da4028 feat(iroh): pass direct addresses from Endpoint to Gossip 2024-07-13 14:36:35 +00:00
link2xt faad7d5843 feat: request smtp ALPN for SMTP TLS connections
Even though SMTP ALPN is not officially registered (unlike IMAP),
it is an obvious choice that will allow
to multiplex SMTP and other protocols on the same TLS port.
2024-07-11 20:57:45 +00:00
link2xt ef0d6d0c90 build(node): pin node-gyp to version 10.1
Newer node-gyp uses newer gyp
which requires newer python
that is not available in Debian 10
container that is
used for building node prebuilds
with old glibc.
2024-07-11 08:59:26 +00:00
link2xt bd83fb3d38 feat: set imap ALPN when connecting to IMAP servers
IMAP has a registered protocol ID
listed at <https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids>

Requesting specific ALPN on the client
should allow the server to
multiplex multiple protocols on the same
port and dispatch
requests to the correct backend on the proxy such as HAProxy.
2024-07-11 05:28:32 +00:00
link2xt f84e603318 refactor: return error from export_backup() without logging
The error is logged by `imex` caller.
2024-07-10 21:14:07 +00:00
link2xt d77459e4fc refactor: move TempPathGuard into tools and use instead of DeleteOnDrop 2024-07-10 20:13:42 +00:00
link2xt 2c14bd353f refactor: move key transfer into its own submodule
`create_setup_code` and `render_setup_file`
are now hidden from public API,
so deltachat-repl does not have "export-setup"
debug command anymore.
2024-07-10 04:29:10 +00:00
link2xt 4d52aa8b7f chore(cargo): update hashlink to remove allocator-api2 dependency 2024-07-09 23:17:21 +00:00
link2xt cc51d51a78 chore(cargo): update iroh from 0.17 to 0.20 2024-07-09 22:11:30 +00:00
link2xt 7f1068e37e chore(release): prepare for 1.141.2 2024-07-09 17:12:59 +00:00
link2xt a2dacc333c fix: distinguish between database errors and no gossip topic 2024-07-09 02:37:48 +00:00
link2xt 088008a030 chore(cargo): update rPGP from 0.11 to 0.13 2024-07-09 01:32:38 +00:00
link2xt a198e9fce8 chore(cargo): update yerpc to 0.6.2 2024-07-06 16:08:35 +00:00
link2xt 5792d7b18d fix(imap): reset new_mail if folder is ignored
This prevents skipping IDLE in infinite loop
if folder is not fetched.
This happens on the INBOX
when OnlyFetchMvbox setting is enabled.
2024-07-02 00:47:52 +00:00
link2xt 7a5dca2645 fix: do not try to register non-iOS tokens for heartbeats
Notification server uses APNS server
for heartbeat notifications,
so registering FCM tokens there
will result in failing to notify them
and unregistering them anyway.
2024-07-01 18:09:15 +00:00
link2xt 71104e9312 chore(release): prepare for 1.141.1 2024-06-27 15:11:19 +00:00
link2xt ced5f51482 refactor: improve logging during SMTP/IMAP configuration 2024-06-27 15:11:19 +00:00
link2xt c400491c07 fix(sql): assign migration adding msgs.deleted a new number 2024-06-27 15:11:19 +00:00
link2xt 11e13d1873 refactor(mimefactory): factor out header confidentiality policy (#5715)
Instead of constructing lists of protected,
unprotected and hidden headers,
construct a single list of headers
and then sort them into separate lists
based on the well-defined policy.

This also fixes the bug
where Subject was not present in the IMF header
for signed-only messages.

Closes #5713
2024-06-26 16:39:04 +00:00
link2xt 6607b7fd62 chore(release): prepare for 1.141.0 2024-06-24 21:03:24 +00:00
link2xt 8d862b5ad3 chore: update provider database 2024-06-24 20:58:46 +00:00
link2xt a82eb7def6 fix: do not require the Message to render MDN 2024-06-23 04:25:19 +00:00
link2xt 76a84ec9b1 refactor: store public key instead of secret key for peer channels
We only need public key, so there is no need to derive
it from secret key every time.
2024-06-21 22:31:21 +00:00
link2xt b5e2ded47a Revert "test: Set fetch_existing_msgs for bots (#4976)"
This reverts commit 25b8a482bc.
2024-06-20 02:00:49 +00:00
link2xt 8953c2a7de fix: do not send sync messages if bcc_self is disabled 2024-06-19 22:11:56 +00:00
link2xt 6aaed3b524 chore: update curve25519-dalek 4.1.x and suppress 3.2.0 warning 2024-06-19 16:34:54 +00:00
link2xt 8ddc05923b api!(deltachat-rpc-client): make {Account,Chat}.get_qr_code() return no SVG
This is a breaking change, old method is renamed into `get_qr_code_svg()`.
2024-06-19 13:29:44 +00:00
link2xt 9cbc9bf2bc api(deltachat-jsonrpc): add get_chat_securejoin_qr_code()
New method is the same as `get_chat_securejoin_qr_code_svg()`,
but does not generate SVG.
2024-06-19 13:29:44 +00:00
link2xt 5489b49cc1 test(deltachat-rpc-client): test that webxdc realtime data is not reordered on the sender 2024-06-18 18:06:44 +00:00
link2xt bdc2c8f456 ci: update Rust to 1.79.0 2024-06-13 20:36:31 +00:00
link2xt 6614864d78 docs: remove outdated documentation comment from send_smtp_messages
Since commit c0a17df344
(PR https://github.com/deltachat/deltachat-core-rust/pull/3402)
`send_smtp_messages` returns an error
as soon as it encounters the first message it failed to send.

Since this worked like this for about 2 years
without any problems, there is no need to revert the change,
but outdated comment should be removed.
2024-06-11 19:14:56 +00:00
link2xt 6a3902d90d chore(release): prepare for 1.140.2 2024-06-07 22:22:27 +00:00
link2xt 6d720b793d chore(release): prepare for 1.140.1 2024-06-05 19:07:26 +00:00
link2xt 380116d107 fix: do not miss new messages while expunging the folder
This should fix flaky `test_verified_group_vs_delete_server_after`.
2024-06-05 18:15:23 +00:00
link2xt 216b295f52 docs(imap): document why CLOSE is faster than EXPUNGE 2024-06-05 18:15:23 +00:00
link2xt 388980ed6c refactor: remove unused select_folder::Error variants 2024-06-05 18:15:23 +00:00
link2xt e596664753 fix: log messages with info! instead of println! 2024-06-05 13:16:21 +00:00
link2xt 79d1c96db4 refactor: improve SMTP logs and errors 2024-06-05 13:16:21 +00:00
link2xt 941208cc64 test(deltachat-rpc-client): reenable log_cli
It was accidentally disabled in f4dfc79808
2024-06-05 09:55:44 +00:00
link2xt 90c30879b1 refactor(imap): make select_folder() accept non-optional folder
If no folder should be selected,
`maybe_close_folder()` can be called directly.
2024-06-04 13:31:40 +00:00
link2xt 0ca1318118 fix: retry sending MDNs on temporary error
Postfix returns 421 4.4.2 Error: timeout exceeded
when overloaded by CI. If MDN is not retried in this case,
`test_qr_readreceipt` fails.
2024-06-04 12:54:47 +00:00
link2xt 0be639b244 chore(release): prepare for 1.140.0 2024-06-04 12:01:55 +00:00
link2xt a4037b8278 refactor: put duplicate code into lookup_chat_or_create_adhoc_group 2024-06-03 20:46:30 +00:00
link2xtandiequidoo 30405056e3 fix: Do not fail to send images with wrong extensions
Try to guess the image format based on its content first.

Co-authored-by: iequidoo <dgreshilov@gmail.com>
2024-06-03 14:56:10 +00:00
link2xt 0fbab7147a fix: prefer Chat-Group-ID over references for new groups 2024-06-03 14:10:32 +00:00
link2xt de57ef5ac7 refactor: factor create_adhoc_group() call out of create_group() 2024-06-03 14:10:32 +00:00
link2xt f48a047fe0 test: refactor test_alias_* into 8 separate tests 2024-06-03 14:10:32 +00:00
link2xt 8ba08432c5 docs: fix a typo in test_partial_group_consistency() 2024-06-03 14:10:32 +00:00
link2xt bf34bd3a62 docs: create_group() does not find chats, only creates them 2024-06-03 14:10:32 +00:00
link2xt 69842c18f7 test: fix logging of TestContext created using TestContext::new_alice()
Before this fix LogSink was dropped immediately,
resulting in no logs printed for contexts created using
TextContext::new_alice(), but printed for contexts created
using TextContext::new().
2024-05-30 21:14:41 +00:00