From 59d1e51b8d2b8b91ce5158343f851a340af8a96f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:07:24 +0000 Subject: [PATCH 1/4] build: (deps): bump image from 4.7.1 to 4.7.2 Bumps [image](https://github.com/brendan-duncan/image) from 4.7.1 to 4.7.2. - [Changelog](https://github.com/brendan-duncan/image/blob/main/CHANGELOG.md) - [Commits](https://github.com/brendan-duncan/image/commits) --- updated-dependencies: - dependency-name: image dependency-version: 4.7.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index c39bc7535..7ba8cbc5a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -843,10 +843,10 @@ packages: dependency: "direct main" description: name: image - sha256: "48c11d0943b93b6fb29103d956ff89aafeae48f6058a3939649be2093dcff0bf" + sha256: "492bd52f6c4fbb6ee41f781ff27765ce5f627910e1e0cbecfa3d9add5562604c" url: "https://pub.dev" source: hosted - version: "4.7.1" + version: "4.7.2" image_picker: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 0bf428f2b..81f94dd89 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -47,7 +47,7 @@ dependencies: highlight: ^0.7.0 html: ^0.15.4 http: ^1.6.0 - image: ^4.7.1 + image: ^4.7.2 image_picker: ^1.2.1 intl: any just_audio: ^0.10.5 From 81eb4a01a1799ec7b0d51008777c3008b1e216a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Tue, 23 Dec 2025 14:31:19 +0100 Subject: [PATCH 2/4] chore: Make cross signing self sign mandatory for bootstrap --- lib/pages/bootstrap/bootstrap_dialog.dart | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/lib/pages/bootstrap/bootstrap_dialog.dart b/lib/pages/bootstrap/bootstrap_dialog.dart index f518fb5d5..be3acfade 100644 --- a/lib/pages/bootstrap/bootstrap_dialog.dart +++ b/lib/pages/bootstrap/bootstrap_dialog.dart @@ -365,20 +365,12 @@ class BootstrapDialogState extends State { Logs().v( 'Cross signing is already enabled. Try to self-sign', ); - try { - await bootstrap - .client - .encryption! - .crossSigning - .selfSign(recoveryKey: key); - Logs().d('Successful selfsigned'); - } catch (e, s) { - Logs().e( - 'Unable to self sign with recovery key after successfully open existing SSSS', - e, - s, - ); - } + await bootstrap + .client + .encryption! + .crossSigning + .selfSign(recoveryKey: key); + Logs().d('Successful selfsigned'); } } on InvalidPassphraseException catch (e) { setState( From 5c5511b5ca3812dc6825893d40d95091febe71f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Tue, 23 Dec 2025 15:04:23 +0100 Subject: [PATCH 3/4] chore: Update user device keys before creating bootstrap --- lib/pages/bootstrap/bootstrap_dialog.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pages/bootstrap/bootstrap_dialog.dart b/lib/pages/bootstrap/bootstrap_dialog.dart index be3acfade..003ad1bc7 100644 --- a/lib/pages/bootstrap/bootstrap_dialog.dart +++ b/lib/pages/bootstrap/bootstrap_dialog.dart @@ -119,6 +119,7 @@ class BootstrapDialogState extends State { while (client.prevBatch == null) { await client.onSync.stream.first; } + await client.updateUserDeviceKeys(); _wipe = wipe; titleText = null; _recoveryKeyStored = false; From 040c18d80fec095a4c6ea715a4e876a51e7332ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Tue, 23 Dec 2025 15:36:36 +0100 Subject: [PATCH 4/4] fix: Better wait for secrets after verification bootstrap --- lib/pages/bootstrap/bootstrap_dialog.dart | 35 +++++++++++------------ 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/lib/pages/bootstrap/bootstrap_dialog.dart b/lib/pages/bootstrap/bootstrap_dialog.dart index 003ad1bc7..e7fa87032 100644 --- a/lib/pages/bootstrap/bootstrap_dialog.dart +++ b/lib/pages/bootstrap/bootstrap_dialog.dart @@ -1,5 +1,3 @@ -import 'dart:async'; - import 'package:flutter/material.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; @@ -444,26 +442,25 @@ class BootstrapDialogState extends State { if (success != true) return; if (!mounted) return; - final waitForSecret = Completer(); - final secretsSub = client - .encryption! - .ssss - .onSecretStored - .stream - .listen((event) async { - if (await client.encryption!.keyManager - .isCached() && - await client.encryption!.crossSigning - .isCached()) { - waitForSecret.complete(); - } - }); - final result = await showFutureLoadingDialog( context: context, - future: () => waitForSecret.future, + future: () async { + final allCached = + await client.encryption!.keyManager + .isCached() && + await client.encryption!.crossSigning + .isCached(); + if (!allCached) { + await client + .encryption! + .ssss + .onSecretStored + .stream + .first; + } + return; + }, ); - await secretsSub.cancel(); if (!mounted) return; if (!result.isError) _goBackAction(true); },