diff --git a/CHANGELOG.md b/CHANGELOG.md index 2546d7e2d..02271ee99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [1.142.11] - 2024-08-30 + +### Fixes + +- Set backward verification when observing vc-contact-confirm or `vg-member-added` ([#5930](https://github.com/deltachat/deltachat-core-rust/pull/5930)). + ## [1.142.10] - 2024-08-26 ### Fixes @@ -4792,3 +4798,4 @@ https://github.com/deltachat/deltachat-core-rust/pulls?q=is%3Apr+is%3Aclosed [1.142.8]: https://github.com/deltachat/deltachat-core-rust/compare/v1.142.7...v1.142.8 [1.142.9]: https://github.com/deltachat/deltachat-core-rust/compare/v1.142.8...v1.142.9 [1.142.10]: https://github.com/deltachat/deltachat-core-rust/compare/v1.142.9..v1.142.10 +[1.142.11]: https://github.com/deltachat/deltachat-core-rust/compare/v1.142.10..v1.142.11 diff --git a/Cargo.lock b/Cargo.lock index 8525fbfaf..f1e7b7797 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1249,7 +1249,7 @@ dependencies = [ [[package]] name = "deltachat" -version = "1.142.10" +version = "1.142.11" dependencies = [ "ansi_term", "anyhow", @@ -1343,7 +1343,7 @@ dependencies = [ [[package]] name = "deltachat-jsonrpc" -version = "1.142.10" +version = "1.142.11" dependencies = [ "anyhow", "async-channel 2.3.1", @@ -1368,7 +1368,7 @@ dependencies = [ [[package]] name = "deltachat-repl" -version = "1.142.10" +version = "1.142.11" dependencies = [ "ansi_term", "anyhow", @@ -1383,7 +1383,7 @@ dependencies = [ [[package]] name = "deltachat-rpc-server" -version = "1.142.10" +version = "1.142.11" dependencies = [ "anyhow", "deltachat", @@ -1412,7 +1412,7 @@ dependencies = [ [[package]] name = "deltachat_ffi" -version = "1.142.10" +version = "1.142.11" dependencies = [ "anyhow", "deltachat", diff --git a/Cargo.toml b/Cargo.toml index 25b5bfeee..50000a591 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat" -version = "1.142.10" +version = "1.142.11" edition = "2021" license = "MPL-2.0" rust-version = "1.77" diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml index a16743f3f..3da136223 100644 --- a/deltachat-ffi/Cargo.toml +++ b/deltachat-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat_ffi" -version = "1.142.10" +version = "1.142.11" description = "Deltachat FFI" edition = "2018" readme = "README.md" diff --git a/deltachat-jsonrpc/Cargo.toml b/deltachat-jsonrpc/Cargo.toml index bdd556605..fb29e265e 100644 --- a/deltachat-jsonrpc/Cargo.toml +++ b/deltachat-jsonrpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat-jsonrpc" -version = "1.142.10" +version = "1.142.11" description = "DeltaChat JSON-RPC API" edition = "2021" default-run = "deltachat-jsonrpc-server" diff --git a/deltachat-jsonrpc/typescript/package.json b/deltachat-jsonrpc/typescript/package.json index 6650eb1b4..546aaea19 100644 --- a/deltachat-jsonrpc/typescript/package.json +++ b/deltachat-jsonrpc/typescript/package.json @@ -58,5 +58,5 @@ }, "type": "module", "types": "dist/deltachat.d.ts", - "version": "1.142.10" + "version": "1.142.11" } diff --git a/deltachat-repl/Cargo.toml b/deltachat-repl/Cargo.toml index 0cb80ac66..4de00b872 100644 --- a/deltachat-repl/Cargo.toml +++ b/deltachat-repl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat-repl" -version = "1.142.10" +version = "1.142.11" license = "MPL-2.0" edition = "2021" repository = "https://github.com/deltachat/deltachat-core-rust" diff --git a/deltachat-rpc-client/pyproject.toml b/deltachat-rpc-client/pyproject.toml index a758b7ec8..87698ae18 100644 --- a/deltachat-rpc-client/pyproject.toml +++ b/deltachat-rpc-client/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "deltachat-rpc-client" -version = "1.142.10" +version = "1.142.11" description = "Python client for Delta Chat core JSON-RPC interface" classifiers = [ "Development Status :: 5 - Production/Stable", diff --git a/deltachat-rpc-client/tests/test_securejoin.py b/deltachat-rpc-client/tests/test_securejoin.py index da7b6090e..effb3149a 100644 --- a/deltachat-rpc-client/tests/test_securejoin.py +++ b/deltachat-rpc-client/tests/test_securejoin.py @@ -61,9 +61,16 @@ def test_qr_setup_contact_svg(acfactory) -> None: @pytest.mark.parametrize("protect", [True, False]) -def test_qr_securejoin(acfactory, protect): +def test_qr_securejoin(acfactory, protect, tmp_path): alice, bob = acfactory.get_online_accounts(2) + # Setup second device for Alice + # to test observing securejoin protocol. + alice.export_backup(tmp_path) + files = list(tmp_path.glob("*.tar")) + alice2 = acfactory.get_unconfigured_account() + alice2.import_backup(files[0]) + logging.info("Alice creates a verified group") alice_chat = alice.create_group("Verified group", protect=protect) assert alice_chat.get_basic_snapshot().is_protected == protect @@ -97,6 +104,14 @@ def test_qr_securejoin(acfactory, protect): bob_contact_alice_snapshot = bob_contact_alice.get_snapshot() assert bob_contact_alice_snapshot.is_verified + # Start second Alice device. + # Alice observes securejoin protocol and verifies Bob on second device. + alice2.start_io() + alice2.wait_for_securejoin_inviter_success() + alice2_contact_bob = alice2.get_contact_by_addr(bob.get_config("addr")) + alice2_contact_bob_snapshot = alice2_contact_bob.get_snapshot() + assert alice2_contact_bob_snapshot.is_verified + def test_qr_securejoin_contact_request(acfactory) -> None: """Alice invites Bob to a group when Bob's chat with Alice is in a contact request mode.""" diff --git a/deltachat-rpc-server/Cargo.toml b/deltachat-rpc-server/Cargo.toml index d9cafb43b..81a51ab75 100644 --- a/deltachat-rpc-server/Cargo.toml +++ b/deltachat-rpc-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat-rpc-server" -version = "1.142.10" +version = "1.142.11" description = "DeltaChat JSON-RPC server" edition = "2021" readme = "README.md" diff --git a/deltachat-rpc-server/npm-package/package.json b/deltachat-rpc-server/npm-package/package.json index b5a81b4aa..a528d574d 100644 --- a/deltachat-rpc-server/npm-package/package.json +++ b/deltachat-rpc-server/npm-package/package.json @@ -15,5 +15,5 @@ }, "type": "module", "types": "index.d.ts", - "version": "1.142.10" + "version": "1.142.11" } diff --git a/package.json b/package.json index df7d448bf..749d62c5e 100644 --- a/package.json +++ b/package.json @@ -55,5 +55,5 @@ "test:mocha": "mocha node/test/test.mjs --growl --reporter=spec --bail --exit" }, "types": "node/dist/index.d.ts", - "version": "1.142.10" + "version": "1.142.11" } diff --git a/python/pyproject.toml b/python/pyproject.toml index 634f46d0f..9e1bdede8 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "deltachat" -version = "1.142.10" +version = "1.142.11" description = "Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat" readme = "README.rst" requires-python = ">=3.7" diff --git a/release-date.in b/release-date.in index 05a6be5fc..d77b3a25b 100644 --- a/release-date.in +++ b/release-date.in @@ -1 +1 @@ -2024-08-26 \ No newline at end of file +2024-08-30 \ No newline at end of file diff --git a/src/securejoin.rs b/src/securejoin.rs index 4723601a6..fa9a00dbf 100644 --- a/src/securejoin.rs +++ b/src/securejoin.rs @@ -637,6 +637,10 @@ pub(crate) async fn observe_securejoin_on_other_device( return Ok(HandshakeMessage::Ignore); }; peerstate.set_verified(key.clone(), fingerprint, addr)?; + if matches!(step, "vg-member-added" | "vc-contact-confirm") { + peerstate.backward_verified_key_id = + Some(context.get_config_i64(Config::KeyId).await?).filter(|&id| id > 0); + } peerstate.prefer_encrypt = EncryptPreference::Mutual; peerstate.save_to_db(&context.sql).await?;