π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix OTP Auth imports without issuers
Neeraj Guptaa819fbd0ee01
diff --git a/mobile/apps/auth/changes/otp-auth-null-issuer.md b/mobile/apps/auth/changes/otp-auth-null-issuer.mdnew file mode 100644index 0000000000..8fddede9df--- /dev/null+++ b/mobile/apps/auth/changes/otp-auth-null-issuer.md@@ -0,0 +1 @@+- Fixed OTP Auth imports for entries without an issuer.diff --git a/mobile/apps/auth/lib/ui/settings/data/import/otp_auth_import_parser.dart b/mobile/apps/auth/lib/ui/settings/data/import/otp_auth_import_parser.dartindex 02440e94f2..549d1a1cbd 100644--- a/mobile/apps/auth/lib/ui/settings/data/import/otp_auth_import_parser.dart+++ b/mobile/apps/auth/lib/ui/settings/data/import/otp_auth_import_parser.dart@@ -102,7 +102,7 @@ Code _accountToCode(Map<String, Object?> account) {3 => Algorithm.sha512,_ => throw const FormatException('Unsupported OTP algorithm'),};- final issuer = account['issuer'] as String;+ final issuer = account['issuer'] as String? ?? '';final label = account['label'] as String;final secret = base32.encode(_bytes(account['secret'])).replaceAll('=', '');final digits = (account['digits'] as int?) ?? 0;