π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] Handle password reentry errors (#11879)
neeraj-pilot86dea359aa18
diff --git a/mobile/apps/photos/lib/core/configuration.dart b/mobile/apps/photos/lib/core/configuration.dartindex 5f70a895ef..f7183a67fc 100644--- a/mobile/apps/photos/lib/core/configuration.dart+++ b/mobile/apps/photos/lib/core/configuration.dart@@ -447,7 +447,7 @@ class Configuration implements LockScreenHost, AccountDeletionHost {CryptoUtil.base642bin(attributes.keyDecryptionNonce),);} catch (e) {- _logger.severe('master-key decryption failed', e);+ _logger.warning('master-key decryption failed: $e');throw Exception("Incorrect password");}await setKey(CryptoUtil.bin2base64(key));diff --git a/mobile/apps/photos/lib/ui/account/password_reentry_page.dart b/mobile/apps/photos/lib/ui/account/password_reentry_page.dartindex 6c28292bc6..27ce419515 100644--- a/mobile/apps/photos/lib/ui/account/password_reentry_page.dart+++ b/mobile/apps/photos/lib/ui/account/password_reentry_page.dart@@ -117,7 +117,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {body: context.strings.recreatePasswordBody,firstButtonLabel: context.strings.useRecoveryKey,);- if (dialogChoice!.action == ButtonAction.first) {+ if (dialogChoice?.action == ButtonAction.first) {if (!mounted) return;// ignore: unawaited_futuresNavigator.of(context).push(@@ -129,8 +129,8 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {);}return;- } catch (e, s) {- _logger.severe("Password verification failed", e, s);+ } catch (e) {+ _logger.warning("Password verification failed: $e");await dialog.hide();if (!mounted) return;final dialogChoice = await showChoiceDialog(@@ -140,7 +140,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {firstButtonLabel: context.strings.contactSupport,secondButtonLabel: context.strings.ok,);- if (dialogChoice!.action == ButtonAction.first) {+ if (dialogChoice?.action == ButtonAction.first) {if (!mounted) return;await sendLogs(context,