Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use uri.host instead of issuer in _GetDigits

Vladyslav Pashynskykh227b7ddba069
diff --git a/auth/lib/models/code.dart b/auth/lib/models/code.dart
index 112d508da3..696d3f2fc1 100644
--- a/auth/lib/models/code.dart
+++ b/auth/lib/models/code.dart
@@ -128,7 +128,7 @@ class Code {
final code = Code(
_getAccount(uri),
issuer,
- _getDigits(uri, issuer),
+ _getDigits(uri),
_getPeriod(uri),
getSanitizedSecret(uri.queryParameters['secret']!),
_getAlgorithm(uri),
@@ -201,11 +201,11 @@ class Code {
}
}
- static int _getDigits(Uri uri, String issuer) {
+ static int _getDigits(Uri uri) {
try {
return int.parse(uri.queryParameters['digits']!);
} catch (e) {
- if (issuer.toLowerCase() == "steam" || issuer.toLowerCase().contains('steampowered.com')) {
+ if (uri.host == "steam") {
return steamDigits;
}
return defaultDigits;