From 63b27f4e6d5ba469558bbf277a13b2d7191f4202 Mon Sep 17 00:00:00 2001 From: Federico Maccaroni Date: Wed, 2 Feb 2022 16:07:58 -0300 Subject: [PATCH 01/17] Removed punctuation on some string resources regarding send (#1747) --- src/App/Resources/AppResources.resx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx index 746658a19..06b132126 100644 --- a/src/App/Resources/AppResources.resx +++ b/src/App/Resources/AppResources.resx @@ -1924,7 +1924,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1992,7 +1992,7 @@ Custom - Share this Send upon save. + Share this Send upon save 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2004,7 +2004,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organization policies are affecting your Send options. From 4373cee636eb40bf592a5c9e99076e2122fbb949 Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Thu, 3 Feb 2022 10:34:20 -0600 Subject: [PATCH 02/17] [Icons] Fast follower changes (#1750) --- src/App/Pages/Vault/AddEditPage.xaml | 2 +- src/App/Pages/Vault/GroupingsPage/GroupingsPageListItem.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App/Pages/Vault/AddEditPage.xaml b/src/App/Pages/Vault/AddEditPage.xaml index 4d80c2fdf..28a31217f 100644 --- a/src/App/Pages/Vault/AddEditPage.xaml +++ b/src/App/Pages/Vault/AddEditPage.xaml @@ -165,7 +165,7 @@ IsVisible="{Binding Cipher.ViewPassword}" /> Date: Thu, 3 Feb 2022 17:46:45 -0300 Subject: [PATCH 03/17] Fix delete account SSO with CME that the OTP parameter was being sent incorrectly to the server (#1751) --- src/Android/MainApplication.cs | 4 ++-- src/App/Pages/Accounts/DeleteAccountViewModel.cs | 7 ++----- .../Pages/Accounts/VerificationCodeViewModel.cs | 4 +++- .../Utilities/VerificationActionsFlowHelper.cs | 15 ++++++++++++--- src/Core/Models/Request/DeleteAccountRequest.cs | 2 ++ src/Core/Services/UserVerificationService.cs | 6 ++---- src/iOS.Core/Utilities/iOSCoreHelpers.cs | 6 +++--- 7 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/Android/MainApplication.cs b/src/Android/MainApplication.cs index 3e58b4cab..1957f70a2 100644 --- a/src/Android/MainApplication.cs +++ b/src/Android/MainApplication.cs @@ -52,14 +52,14 @@ namespace Bit.Droid var deleteAccountActionFlowExecutioner = new DeleteAccountActionFlowExecutioner( ServiceContainer.Resolve("apiService"), ServiceContainer.Resolve("messagingService"), - ServiceContainer.Resolve("cryptoService"), ServiceContainer.Resolve("platformUtilsService"), ServiceContainer.Resolve("deviceActionService")); ServiceContainer.Register("deleteAccountActionFlowExecutioner", deleteAccountActionFlowExecutioner); var verificationActionsFlowHelper = new VerificationActionsFlowHelper( ServiceContainer.Resolve("keyConnectorService"), - ServiceContainer.Resolve("passwordRepromptService")); + ServiceContainer.Resolve("passwordRepromptService"), + ServiceContainer.Resolve("cryptoService")); ServiceContainer.Register("verificationActionsFlowHelper", verificationActionsFlowHelper); } #if !FDROID diff --git a/src/App/Pages/Accounts/DeleteAccountViewModel.cs b/src/App/Pages/Accounts/DeleteAccountViewModel.cs index 53c195e58..cab70bd38 100644 --- a/src/App/Pages/Accounts/DeleteAccountViewModel.cs +++ b/src/App/Pages/Accounts/DeleteAccountViewModel.cs @@ -58,19 +58,16 @@ namespace Bit.App.Pages { readonly IApiService _apiService; readonly IMessagingService _messagingService; - readonly ICryptoService _cryptoService; readonly IPlatformUtilsService _platformUtilsService; readonly IDeviceActionService _deviceActionService; public DeleteAccountActionFlowExecutioner(IApiService apiService, IMessagingService messagingService, - ICryptoService cryptoService, IPlatformUtilsService platformUtilsService, IDeviceActionService deviceActionService) { _apiService = apiService; _messagingService = messagingService; - _cryptoService = cryptoService; _platformUtilsService = platformUtilsService; _deviceActionService = deviceActionService; } @@ -81,10 +78,10 @@ namespace Bit.App.Pages { await _deviceActionService.ShowLoadingAsync(AppResources.DeletingYourAccount); - var masterPasswordHashKey = await _cryptoService.HashPasswordAsync(parameters.Secret, null); await _apiService.DeleteAccountAsync(new Core.Models.Request.DeleteAccountRequest { - MasterPasswordHash = masterPasswordHashKey + MasterPasswordHash = parameters.VerificationType == Core.Enums.VerificationType.MasterPassword ? parameters.Secret : (string)null, + OTP = parameters.VerificationType == Core.Enums.VerificationType.OTP ? parameters.Secret : (string)null }); await _deviceActionService.HideLoadingAsync(); diff --git a/src/App/Pages/Accounts/VerificationCodeViewModel.cs b/src/App/Pages/Accounts/VerificationCodeViewModel.cs index 5bc57a2f4..e160a535d 100644 --- a/src/App/Pages/Accounts/VerificationCodeViewModel.cs +++ b/src/App/Pages/Accounts/VerificationCodeViewModel.cs @@ -10,6 +10,7 @@ using Xamarin.CommunityToolkit.ObjectModel; using System.Windows.Input; using Bit.App.Utilities; using Bit.Core; +using Bit.Core.Enums; #if !FDROID using Microsoft.AppCenter.Crashes; #endif @@ -144,7 +145,7 @@ namespace Bit.App.Pages await _deviceActionService.ShowLoadingAsync(AppResources.Verifying); - if (!await _userVerificationService.VerifyUser(Secret, Core.Enums.VerificationType.OTP)) + if (!await _userVerificationService.VerifyUser(Secret, VerificationType.OTP)) { await _deviceActionService.HideLoadingAsync(); return; @@ -154,6 +155,7 @@ namespace Bit.App.Pages var parameters = _verificationActionsFlowHelper.GetParameters(); parameters.Secret = Secret; + parameters.VerificationType = VerificationType.OTP; await _verificationActionsFlowHelper.ExecuteAsync(parameters); Secret = string.Empty; diff --git a/src/App/Utilities/VerificationActionsFlowHelper.cs b/src/App/Utilities/VerificationActionsFlowHelper.cs index 79feab0bc..eaf3376e9 100644 --- a/src/App/Utilities/VerificationActionsFlowHelper.cs +++ b/src/App/Utilities/VerificationActionsFlowHelper.cs @@ -24,11 +24,15 @@ namespace Bit.App.Utilities public interface IActionFlowParmeters { + VerificationType VerificationType { get; set; } + string Secret { get; set; } } public class DefaultActionFlowParameters : IActionFlowParmeters { + public VerificationType VerificationType { get; set; } + public string Secret { get; set; } } @@ -58,6 +62,7 @@ namespace Bit.App.Utilities { private readonly IKeyConnectorService _keyConnectorService; private readonly IPasswordRepromptService _passwordRepromptService; + private readonly ICryptoService _cryptoService; private VerificationFlowAction? _action; private IActionFlowParmeters _parameters; @@ -67,10 +72,12 @@ namespace Bit.App.Utilities private readonly Dictionary _actionExecutionerDictionary = new Dictionary(); public VerificationActionsFlowHelper(IKeyConnectorService keyConnectorService, - IPasswordRepromptService passwordRepromptService) + IPasswordRepromptService passwordRepromptService, + ICryptoService cryptoService) { _keyConnectorService = keyConnectorService; _passwordRepromptService = passwordRepromptService; + _cryptoService = cryptoService; _actionExecutionerDictionary.Add(VerificationFlowAction.DeleteAccount, ServiceContainer.Resolve("deleteAccountActionFlowExecutioner")); } @@ -113,8 +120,10 @@ namespace Bit.App.Utilities return; } - GetParameters().Secret = password; - await ExecuteAsync(_parameters); + var parameters = GetParameters(); + parameters.Secret = await _cryptoService.HashPasswordAsync(password, null); + parameters.VerificationType = VerificationType.MasterPassword; + await ExecuteAsync(parameters); break; case VerificationType.OTP: await Application.Current.MainPage.Navigation.PushModalAsync(new NavigationPage( diff --git a/src/Core/Models/Request/DeleteAccountRequest.cs b/src/Core/Models/Request/DeleteAccountRequest.cs index 7776d890e..8eb38d347 100644 --- a/src/Core/Models/Request/DeleteAccountRequest.cs +++ b/src/Core/Models/Request/DeleteAccountRequest.cs @@ -3,5 +3,7 @@ public class DeleteAccountRequest { public string MasterPasswordHash { get; set; } + + public string OTP { get; set; } } } diff --git a/src/Core/Services/UserVerificationService.cs b/src/Core/Services/UserVerificationService.cs index ae65d7f7b..74031b55c 100644 --- a/src/Core/Services/UserVerificationService.cs +++ b/src/Core/Services/UserVerificationService.cs @@ -1,9 +1,7 @@ -using System; +using System.Threading.Tasks; +using Bit.Core.Abstractions; using Bit.Core.Enums; using Bit.Core.Models.Request; -using Bit.Core.Services; -using Bit.Core.Abstractions; -using System.Threading.Tasks; namespace Bit.Core.Services { diff --git a/src/iOS.Core/Utilities/iOSCoreHelpers.cs b/src/iOS.Core/Utilities/iOSCoreHelpers.cs index 633803c81..1bac23f65 100644 --- a/src/iOS.Core/Utilities/iOSCoreHelpers.cs +++ b/src/iOS.Core/Utilities/iOSCoreHelpers.cs @@ -154,14 +154,14 @@ namespace Bit.iOS.Core.Utilities var deleteAccountActionFlowExecutioner = new DeleteAccountActionFlowExecutioner( ServiceContainer.Resolve("apiService"), ServiceContainer.Resolve("messagingService"), - ServiceContainer.Resolve("cryptoService"), ServiceContainer.Resolve("platformUtilsService"), ServiceContainer.Resolve("deviceActionService")); ServiceContainer.Register("deleteAccountActionFlowExecutioner", deleteAccountActionFlowExecutioner); var verificationActionsFlowHelper = new VerificationActionsFlowHelper( - ServiceContainer.Resolve("keyConnectorService"), - ServiceContainer.Resolve("passwordRepromptService")); + ServiceContainer.Resolve("keyConnectorService"), + ServiceContainer.Resolve("passwordRepromptService"), + ServiceContainer.Resolve("cryptoService")); ServiceContainer.Register("verificationActionsFlowHelper", verificationActionsFlowHelper); if (postBootstrapFunc != null) From 10fafaf8c85bcc6de8990e5b71478b97ac4ac0db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 12:56:49 +0100 Subject: [PATCH 04/17] Autosync the updated translations (#1752) Co-authored-by: github-actions <> --- src/App/Resources/AppResources.az.resx | 16 ++++---- src/App/Resources/AppResources.be.resx | 2 +- src/App/Resources/AppResources.bn.resx | 6 +-- src/App/Resources/AppResources.cs.resx | 18 ++++----- src/App/Resources/AppResources.da.resx | 6 +-- src/App/Resources/AppResources.en-IN.resx | 6 +-- src/App/Resources/AppResources.fa.resx | 4 +- src/App/Resources/AppResources.fil.resx | 6 +-- src/App/Resources/AppResources.hi.resx | 6 +-- src/App/Resources/AppResources.it.resx | 2 +- src/App/Resources/AppResources.ka.resx | 6 +-- src/App/Resources/AppResources.ml.resx | 4 +- src/App/Resources/AppResources.nb.resx | 42 ++++++++++----------- src/App/Resources/AppResources.nn.resx | 6 +-- src/App/Resources/AppResources.pl.resx | 6 +-- src/App/Resources/AppResources.pt-BR.resx | 2 +- src/App/Resources/AppResources.ro.resx | 6 +-- src/App/Resources/AppResources.si.resx | 6 +-- src/App/Resources/AppResources.sl.resx | 2 +- src/App/Resources/AppResources.sv.resx | 16 ++++---- src/App/Resources/AppResources.th.resx | 6 +-- src/App/Resources/AppResources.vi.resx | 6 +-- src/App/Resources/AppResources.zh-Hant.resx | 2 +- 23 files changed, 91 insertions(+), 91 deletions(-) diff --git a/src/App/Resources/AppResources.az.resx b/src/App/Resources/AppResources.az.resx index b4b94c724..1d73a97e1 100644 --- a/src/App/Resources/AppResources.az.resx +++ b/src/App/Resources/AppResources.az.resx @@ -2111,7 +2111,7 @@ Etibarsız təsdiqləmə kodu - Request one-time password + Tək istifadəlik parol tələb et Kod göndər @@ -2120,24 +2120,24 @@ Göndərilir - Copy Send link on save + Send bağlantısını saxlamaq üçün kopyala - Sending code + Kod göndərilir - Verifying + Təsdiqlənir - Resend Code + Kodu təkrar göndər - A verification code was sent to your email + Təsdiqləmə kodu e-poçtunuza göndərildi - An error occurred while sending a verification code to your email. Please try again + E-poçtunuza təsdiqləmə kodu göndərilərkən bir xəta baş verdi. Zəhmət olmasa yenidən sınayın - Enter the verification code that was sent to your email + E-poçtunuza göndərilmiş təsdiqləmə kodunu daxil edin diff --git a/src/App/Resources/AppResources.be.resx b/src/App/Resources/AppResources.be.resx index b6472ec8c..05afd0783 100644 --- a/src/App/Resources/AppResources.be.resx +++ b/src/App/Resources/AppResources.be.resx @@ -1923,7 +1923,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. diff --git a/src/App/Resources/AppResources.bn.resx b/src/App/Resources/AppResources.bn.resx index 93bcd893f..7d4094c9c 100644 --- a/src/App/Resources/AppResources.bn.resx +++ b/src/App/Resources/AppResources.bn.resx @@ -1924,7 +1924,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1992,7 +1992,7 @@ Custom - Share this Send upon save. + Share this Send upon save 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2004,7 +2004,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organization policies are affecting your Send options. diff --git a/src/App/Resources/AppResources.cs.resx b/src/App/Resources/AppResources.cs.resx index aaa3a3648..a216c4bf9 100644 --- a/src/App/Resources/AppResources.cs.resx +++ b/src/App/Resources/AppResources.cs.resx @@ -2042,10 +2042,10 @@ Your Master Password was recently changed by an administrator in your organization. In order to access the vault, you must update your Master Password now. Proceeding will log you out of your current session, requiring you to log back in. Active sessions on other devices may continue to remain active for up to one hour. - Updating Password + Aktualizace hesla - Currently unable to update password + Aktuálně nelze aktualizovat heslo Odstranit hlavní heslo @@ -2057,7 +2057,7 @@ If you do not want to remove your Master Password, you may leave this organization. - Leave Organization + Opustit organizaci Leave {0}? @@ -2111,7 +2111,7 @@ Neplatný ověřovací kód. - Request one-time password + Vyžádat jednorázové heslo Poslat kód @@ -2120,19 +2120,19 @@ Odesílání - Copy Send link on save + Při uložení zkopírovat odkaz na Send - Sending code + Odesílání kódu - Verifying + Ověřování - Resend Code + Znovu odeslat kód - A verification code was sent to your email + Ověřovací kód byl odeslán na váš e-mail An error occurred while sending a verification code to your email. Please try again diff --git a/src/App/Resources/AppResources.da.resx b/src/App/Resources/AppResources.da.resx index f7e6b4f97..6af06fb14 100644 --- a/src/App/Resources/AppResources.da.resx +++ b/src/App/Resources/AppResources.da.resx @@ -1923,7 +1923,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Deaktivér denne Send, så ingen kan tilgå den. + Deaktivér denne Send, så ingen kan tilgå den 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1991,7 +1991,7 @@ Tilpasset - Del denne Send, når den gemmes. + Del denne Send, når den gemmes 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2003,7 +2003,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Skjul min e-mailadresse for modtagere. + Skjul min e-mailadresse for modtagere Én eller flere organisationspolitikker påvirker dine Send-valgmuligheder. diff --git a/src/App/Resources/AppResources.en-IN.resx b/src/App/Resources/AppResources.en-IN.resx index ccc2f71a6..102239845 100644 --- a/src/App/Resources/AppResources.en-IN.resx +++ b/src/App/Resources/AppResources.en-IN.resx @@ -1936,7 +1936,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2004,7 +2004,7 @@ Custom - Share this Send upon save. + Share this Send upon save 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2016,7 +2016,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organisation policies are affecting your Send options. diff --git a/src/App/Resources/AppResources.fa.resx b/src/App/Resources/AppResources.fa.resx index 65d6a91b7..ec81864ac 100644 --- a/src/App/Resources/AppResources.fa.resx +++ b/src/App/Resources/AppResources.fa.resx @@ -2112,7 +2112,7 @@ کد تایید نامعتبر است. - Request one-time password + درخواست رمز یکبار مصرف ارسال کد @@ -2121,7 +2121,7 @@ درحال ارسال - Copy Send link on save + لینک ارسال را در ذخیره کپی کن درحال ارسال کد diff --git a/src/App/Resources/AppResources.fil.resx b/src/App/Resources/AppResources.fil.resx index 072498ff8..a7a073d97 100644 --- a/src/App/Resources/AppResources.fil.resx +++ b/src/App/Resources/AppResources.fil.resx @@ -1924,7 +1924,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1992,7 +1992,7 @@ Custom - Share this Send upon save. + Share this Send upon save 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2004,7 +2004,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organization policies are affecting your Send options. diff --git a/src/App/Resources/AppResources.hi.resx b/src/App/Resources/AppResources.hi.resx index 881ccd857..4eb028bc1 100644 --- a/src/App/Resources/AppResources.hi.resx +++ b/src/App/Resources/AppResources.hi.resx @@ -1925,7 +1925,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1993,7 +1993,7 @@ Custom - Share this Send upon save. + Share this Send upon save 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2005,7 +2005,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organization policies are affecting your Send options. diff --git a/src/App/Resources/AppResources.it.resx b/src/App/Resources/AppResources.it.resx index ce1c968ed..c3986951e 100644 --- a/src/App/Resources/AppResources.it.resx +++ b/src/App/Resources/AppResources.it.resx @@ -1821,7 +1821,7 @@ Se abilitato, il servizio di accessibilità di Bitwarden mostrerà una finestra a comparsa quando i campi login vengono selezionati per aiutarti con l'auto-completamento. - Se abilitato, l'accessibilità mostrerà una finestra a compaesa per aumentare il servizio di auto-completamento per le vecchie applicazioni che non supportano il framework di auto-completamento di Android. + Se abilitato, l'accessibilità mostrerà una finestra a comparsa per aumentare il servizio di auto-completamento per le vecchie applicazioni che non supportano il framework di auto-completamento di Android. A causa di una policy aziendale, non è possibile salvare elementi nella tua cassaforte personale. Cambia l'opzione proprietà in un'organizzazione e scegli tra le raccolte disponibili. diff --git a/src/App/Resources/AppResources.ka.resx b/src/App/Resources/AppResources.ka.resx index 072498ff8..a7a073d97 100644 --- a/src/App/Resources/AppResources.ka.resx +++ b/src/App/Resources/AppResources.ka.resx @@ -1924,7 +1924,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1992,7 +1992,7 @@ Custom - Share this Send upon save. + Share this Send upon save 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2004,7 +2004,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organization policies are affecting your Send options. diff --git a/src/App/Resources/AppResources.ml.resx b/src/App/Resources/AppResources.ml.resx index 3500fad2f..faca7a664 100644 --- a/src/App/Resources/AppResources.ml.resx +++ b/src/App/Resources/AppResources.ml.resx @@ -1923,7 +1923,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2003,7 +2003,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organization policies are affecting your Send options. diff --git a/src/App/Resources/AppResources.nb.resx b/src/App/Resources/AppResources.nb.resx index 6deee337a..03fb9e3ce 100644 --- a/src/App/Resources/AppResources.nb.resx +++ b/src/App/Resources/AppResources.nb.resx @@ -2034,64 +2034,64 @@ Captcha feilet. Prøv på nytt. - Updated Master Password + Oppdaterte hovedpassordet - Update Master Password + Oppdater hovedpassord - Your Master Password was recently changed by an administrator in your organization. In order to access the vault, you must update your Master Password now. Proceeding will log you out of your current session, requiring you to log back in. Active sessions on other devices may continue to remain active for up to one hour. + Hovedpassordet ditt ble nylig endret av en administrator i organisasjonen din. For å få tilgang til hvelvet, må du oppdatere hovedpassordet ditt nå. Hvis du fortsetter, logges du ut av den nåværende økten, og du må logge på igjen. Aktive økter på andre enheter kan fortsette å være aktive i opptil én time. - Updating Password + Oppdaterer passord - Currently unable to update password + Kan for øyeblikket ikke oppdatere passord - Remove Master Password + Fjern hovedpassord - {0} is using SSO with customer-managed encryption. Continuing will remove your Master Password from your account and require SSO to login. + {0} bruker SSO med kundeadministrert kryptering. Hvis du fortsetter, fjernes hovedpassordet ditt fra kontoen din, og SSO kreves for å logge på. - If you do not want to remove your Master Password, you may leave this organization. + Hvis du ikke vil fjerne hovedpassordet ditt, kan du forlate denne organisasjonen. - Leave Organization + Forlat organisasjonen - Leave {0}? + Vil du forlate {0}? FIDO2 WebAuthn - To continue, have your FIDO2 WebAuthn enabled security key ready, then follow the instructions after clicking 'Authenticate WebAuthn' on the next screen. + For å fortsette, ha din FIDO2 WebAuthn-aktiverte sikkerhetsnøkkel klar, og følg deretter instruksjonene etter å ha klikket på 'Autentiser WebAuthn' på den neste skjermen. - Authentication using FIDO2 WebAuthn, you can authenticate using an external security key. + Autentisering med FIDO2 WebAuthn, du kan autentisere med en ekstern sikkerhetsnøkkel. - Authenticate WebAuthn + Autentiser WebAuthn - Return to App + Gå tilbake til appen - Please make sure your default browser supports WebAuthn and try again. + Sørg for at standardnettleseren din støtter WebAuthn og prøv igjen. - This organization has an enterprise policy that will automatically enroll you in password reset. Enrollment will allow organization administrators to change your master password. + Denne organisasjonen har en bedriftsoppsettsregel som automatisk innrullerer deg i tilbakestilling av passord. Registrering vil tillate organisasjonsadministratorer å endre hovedpassordet ditt. - Your organization policies are affecting your vault timeout. Maximum allowed Vault Timeout is {0} hour(s) and {1} minute(s) + Din organisasjons retningslinjer påvirker tidsavbruddet for hvelvet. Maksimalt tillatt tidsavbrudd for hvelv er {0} time(r) og {1} minutt(er) - Your vault timeout exceeds the restrictions set by your organization. + Tidsavbruddet ditt for hvelvet overstiger begrensningene som er satt av organisasjonen din. - One or more organization policies prevents your from exporting your personal vault. + En eller flere organisasjonsoppsettsregler hindrer deg i å eksportere ditt personlige hvelv. Slett konto @@ -2112,7 +2112,7 @@ Ugyldig verifiseringskode. - Request one-time password + Be om éngangspassord Send kode @@ -2121,7 +2121,7 @@ Sender - Copy Send link on save + Kopier Send-lenke ved lagring Sender kode diff --git a/src/App/Resources/AppResources.nn.resx b/src/App/Resources/AppResources.nn.resx index 072498ff8..a7a073d97 100644 --- a/src/App/Resources/AppResources.nn.resx +++ b/src/App/Resources/AppResources.nn.resx @@ -1924,7 +1924,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1992,7 +1992,7 @@ Custom - Share this Send upon save. + Share this Send upon save 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2004,7 +2004,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organization policies are affecting your Send options. diff --git a/src/App/Resources/AppResources.pl.resx b/src/App/Resources/AppResources.pl.resx index 9f3519513..458b70cb3 100644 --- a/src/App/Resources/AppResources.pl.resx +++ b/src/App/Resources/AppResources.pl.resx @@ -1923,7 +1923,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Wyłącz wysyłkę, aby nikt nie miał do niej dostępu. + Wyłącz wysyłkę, aby nikt nie miał do niej dostępu 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1991,7 +1991,7 @@ Niestandardowe - Udostępnij wysyłkę po zapisaniu. + Udostępnij wysyłkę po zapisaniu 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2003,7 +2003,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Ukryj mój adres e-mail przed odbiorcami. + Ukryj mój adres e-mail przed odbiorcami Co najmniej jedna zasada organizacji wpływa na ustawienia wysyłek. diff --git a/src/App/Resources/AppResources.pt-BR.resx b/src/App/Resources/AppResources.pt-BR.resx index 790e7e30b..7a7ce3f8d 100644 --- a/src/App/Resources/AppResources.pt-BR.resx +++ b/src/App/Resources/AppResources.pt-BR.resx @@ -1924,7 +1924,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Desative este Send para que ninguém possa acessá-lo. + Desabilite este Send para que ninguém possa acessá-lo. 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. diff --git a/src/App/Resources/AppResources.ro.resx b/src/App/Resources/AppResources.ro.resx index 3dbb210cc..c618e2324 100644 --- a/src/App/Resources/AppResources.ro.resx +++ b/src/App/Resources/AppResources.ro.resx @@ -1923,7 +1923,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Dezactivați acest Send astfel încât nimeni să nu-l poată accesa. + Dezactivați acest Send pentru ca nimeni să nu-l poată accesa 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1991,7 +1991,7 @@ Personalizat - Partajați această Send după salvare. + Partajați această Send după salvare 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2003,7 +2003,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Ascundeți adresa mea de e-mail de la destinatari. + Ascundeți adresa mea de e-mail de la destinatari Una sau mai multe politici organizaționale vă afectează opțiunile Send-ului. diff --git a/src/App/Resources/AppResources.si.resx b/src/App/Resources/AppResources.si.resx index 91206dde9..ffbf5d0fe 100644 --- a/src/App/Resources/AppResources.si.resx +++ b/src/App/Resources/AppResources.si.resx @@ -1924,7 +1924,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1992,7 +1992,7 @@ Custom - Share this Send upon save. + Share this Send upon save 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2004,7 +2004,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organization policies are affecting your Send options. diff --git a/src/App/Resources/AppResources.sl.resx b/src/App/Resources/AppResources.sl.resx index 07b03cd59..2c97e2782 100644 --- a/src/App/Resources/AppResources.sl.resx +++ b/src/App/Resources/AppResources.sl.resx @@ -1924,7 +1924,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. diff --git a/src/App/Resources/AppResources.sv.resx b/src/App/Resources/AppResources.sv.resx index 3ccf53fbb..1c9e8146b 100644 --- a/src/App/Resources/AppResources.sv.resx +++ b/src/App/Resources/AppResources.sv.resx @@ -239,7 +239,7 @@ Hjälp & Feedback - Göm + Dölj Hide a secret value that is currently shown (password). @@ -412,7 +412,7 @@ Undvik tvetydiga tecken - Bitwarden apptillägg + Bitwarden Apptillägg Det enklaste sättet att lägga till nya inloggningar i ditt valv är genom apptillägget. Läs mer om Bitwardens apptillägg genom att navigera till fliken "Inställningar". @@ -1582,7 +1582,7 @@ Din inloggningssession har upphört. - Använd biometri för att bekräfta. + Biometrisk verifiering Biometri @@ -1920,7 +1920,7 @@ Lösenordet har tagits bort. - Private notes about this Send. + Privata anteckningar om denna Send. 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2124,21 +2124,21 @@ Copy Send link on save - Sending code + Skickar kod - Verifying + Verifierar Resend Code - A verification code was sent to your email + En verifieringskod skickades till din e-postadress An error occurred while sending a verification code to your email. Please try again - Enter the verification code that was sent to your email + Ange verifieringskoden som skickades till din e-postadress diff --git a/src/App/Resources/AppResources.th.resx b/src/App/Resources/AppResources.th.resx index 9724140f2..6920043a5 100644 --- a/src/App/Resources/AppResources.th.resx +++ b/src/App/Resources/AppResources.th.resx @@ -1924,7 +1924,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1992,7 +1992,7 @@ Custom - Share this Send upon save. + Share this Send upon save 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2004,7 +2004,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organization policies are affecting your Send options. diff --git a/src/App/Resources/AppResources.vi.resx b/src/App/Resources/AppResources.vi.resx index 945d1d993..661decc8e 100644 --- a/src/App/Resources/AppResources.vi.resx +++ b/src/App/Resources/AppResources.vi.resx @@ -1923,7 +1923,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Disable this Send so that no one can access it. + Disable this Send so that no one can access it 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -1991,7 +1991,7 @@ Custom - Share this Send upon save. + Share this Send upon save 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. @@ -2003,7 +2003,7 @@ 'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated. - Hide my email address from recipients. + Hide my email address from recipients One or more organization policies are affecting your Send options. diff --git a/src/App/Resources/AppResources.zh-Hant.resx b/src/App/Resources/AppResources.zh-Hant.resx index 680bfaa7c..6b8401acc 100644 --- a/src/App/Resources/AppResources.zh-Hant.resx +++ b/src/App/Resources/AppResources.zh-Hant.resx @@ -884,7 +884,7 @@ 將相機對準 QR code 。 - 掃描 QR Code + 掃描 QR 碼 相機 From 427ff09af0259c2aa325f5ac124764711aaa4876 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Tue, 8 Feb 2022 17:43:40 +0100 Subject: [PATCH 05/17] Client & Version headers (#1757) --- .../Pages/Accounts/LoginSsoPageViewModel.cs | 2 +- .../Services/MobilePlatformUtilsService.cs | 8 +++-- .../Abstractions/IPlatformUtilsService.cs | 3 +- src/Core/Enums/ClientType.cs | 36 +++++++++++++++++++ src/Core/Services/ApiService.cs | 5 ++- 5 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 src/Core/Enums/ClientType.cs diff --git a/src/App/Pages/Accounts/LoginSsoPageViewModel.cs b/src/App/Pages/Accounts/LoginSsoPageViewModel.cs index 319992292..18ed6ad46 100644 --- a/src/App/Pages/Accounts/LoginSsoPageViewModel.cs +++ b/src/App/Pages/Accounts/LoginSsoPageViewModel.cs @@ -116,7 +116,7 @@ namespace Bit.App.Pages var redirectUri = "bitwarden://sso-callback"; var url = _apiService.IdentityBaseUrl + "/connect/authorize?" + - "client_id=" + _platformUtilsService.IdentityClientId + "&" + + "client_id=" + _platformUtilsService.GetClientType().GetString() + "&" + "redirect_uri=" + Uri.EscapeDataString(redirectUri) + "&" + "response_type=code&scope=api%20offline_access&" + "state=" + state + "&code_challenge=" + codeChallenge + "&" + diff --git a/src/App/Services/MobilePlatformUtilsService.cs b/src/App/Services/MobilePlatformUtilsService.cs index 610b60fcd..f4e98e250 100644 --- a/src/App/Services/MobilePlatformUtilsService.cs +++ b/src/App/Services/MobilePlatformUtilsService.cs @@ -5,6 +5,7 @@ using Bit.App.Abstractions; using Bit.App.Models; using Bit.App.Resources; using Bit.Core.Abstractions; +using Bit.Core.Enums; using Plugin.Fingerprint; using Plugin.Fingerprint.Abstractions; using Xamarin.Essentials; @@ -35,8 +36,6 @@ namespace Bit.App.Services _broadcasterService = broadcasterService; } - public string IdentityClientId => "mobile"; - public void Init() { _broadcasterService.Subscribe(nameof(MobilePlatformUtilsService), (message) => @@ -80,6 +79,11 @@ namespace Bit.App.Services return DeviceInfo.Model; } + public ClientType GetClientType() + { + return ClientType.Mobile; + } + public bool IsViewOpen() { return false; diff --git a/src/Core/Abstractions/IPlatformUtilsService.cs b/src/Core/Abstractions/IPlatformUtilsService.cs index c03f3f87c..ec5b2894f 100644 --- a/src/Core/Abstractions/IPlatformUtilsService.cs +++ b/src/Core/Abstractions/IPlatformUtilsService.cs @@ -7,11 +7,10 @@ namespace Bit.Core.Abstractions { public interface IPlatformUtilsService { - string IdentityClientId { get; } - string GetApplicationVersion(); DeviceType GetDevice(); string GetDeviceString(); + ClientType GetClientType(); bool IsDev(); bool IsSelfHost(); bool IsViewOpen(); diff --git a/src/Core/Enums/ClientType.cs b/src/Core/Enums/ClientType.cs new file mode 100644 index 000000000..f6d3fd9c2 --- /dev/null +++ b/src/Core/Enums/ClientType.cs @@ -0,0 +1,36 @@ +namespace Bit.Core.Enums +{ + public enum ClientType: byte + { + Web = 1, + Browser = 2, + Desktop = 3, + Mobile = 4, + Cli = 5, + DirectoryConnector = 6, + } + + public static class ClientTypeExtensions + { + public static string GetString(this ClientType me) + { + switch (me) + { + case ClientType.Web: + return "web"; + case ClientType.Browser: + return "browser"; + case ClientType.Desktop: + return "desktop"; + case ClientType.Mobile: + return "mobile"; + case ClientType.Cli: + return "cli"; + case ClientType.DirectoryConnector: + return "connector"; + default: + return ""; + } + } + } +} diff --git a/src/Core/Services/ApiService.cs b/src/Core/Services/ApiService.cs index 93092aa93..c0b11a6a1 100644 --- a/src/Core/Services/ApiService.cs +++ b/src/Core/Services/ApiService.cs @@ -1,4 +1,5 @@ using Bit.Core.Abstractions; +using Bit.Core.Enums; using Bit.Core.Exceptions; using Bit.Core.Models.Domain; using Bit.Core.Models.Request; @@ -37,6 +38,8 @@ namespace Bit.Core.Services _logoutCallbackAsync = logoutCallbackAsync; var device = (int)_platformUtilsService.GetDevice(); _httpClient.DefaultRequestHeaders.Add("Device-Type", device.ToString()); + _httpClient.DefaultRequestHeaders.Add("Bitwarden-Client-Name", _platformUtilsService.GetClientType().GetString()); + _httpClient.DefaultRequestHeaders.Add("Bitwarden-Client-Version", _platformUtilsService.GetApplicationVersion()); if (!string.IsNullOrWhiteSpace(customUserAgent)) { _httpClient.DefaultRequestHeaders.UserAgent.ParseAdd(customUserAgent); @@ -87,7 +90,7 @@ namespace Bit.Core.Services Version = new Version(1, 0), RequestUri = new Uri(string.Concat(IdentityBaseUrl, "/connect/token")), Method = HttpMethod.Post, - Content = new FormUrlEncodedContent(request.ToIdentityToken(_platformUtilsService.IdentityClientId)) + Content = new FormUrlEncodedContent(request.ToIdentityToken(_platformUtilsService.GetClientType().GetString())) }; requestMessage.Headers.Add("Accept", "application/json"); request.AlterIdentityTokenHeaders(requestMessage.Headers); From 3491c1aaebaee5e9c80f12ca428970732fcc6900 Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Tue, 8 Feb 2022 17:42:53 -0600 Subject: [PATCH 06/17] [Help] Update links to new pattern (#1758) --- src/App/Pages/Accounts/TwoFactorPageViewModel.cs | 2 +- .../Settings/SettingsPage/SettingsPageViewModel.cs | 12 ++++++------ src/App/Pages/Vault/AddEditPageViewModel.cs | 2 +- src/App/Pages/Vault/AttachmentsPageViewModel.cs | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/App/Pages/Accounts/TwoFactorPageViewModel.cs b/src/App/Pages/Accounts/TwoFactorPageViewModel.cs index f663c4217..c2f1eb6b6 100644 --- a/src/App/Pages/Accounts/TwoFactorPageViewModel.cs +++ b/src/App/Pages/Accounts/TwoFactorPageViewModel.cs @@ -328,7 +328,7 @@ namespace Bit.App.Pages AppResources.Cancel, null, options.ToArray()); if (method == AppResources.RecoveryCodeTitle) { - _platformUtilsService.LaunchUri("https://help.bitwarden.com/article/lost-two-step-device/"); + _platformUtilsService.LaunchUri("https://bitwarden.com/help/lost-two-step-device/"); } else if (method != AppResources.Cancel && method != null) { diff --git a/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs b/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs index ec9121fc5..11f389841 100644 --- a/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs +++ b/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs @@ -157,7 +157,7 @@ namespace Bit.App.Pages public void Help() { - _platformUtilsService.LaunchUri("https://help.bitwarden.com/"); + _platformUtilsService.LaunchUri("https://bitwarden.com/help/"); } public async Task FingerprintAsync() @@ -177,7 +177,7 @@ namespace Bit.App.Pages AppResources.LearnMore, AppResources.Close); if (learnMore) { - _platformUtilsService.LaunchUri("https://help.bitwarden.com/article/fingerprint-phrase/"); + _platformUtilsService.LaunchUri("https://bitwarden.com/help/fingerprint-phrase/"); } } @@ -188,7 +188,7 @@ namespace Bit.App.Pages public void Import() { - _platformUtilsService.LaunchUri("https://help.bitwarden.com/article/import-data/"); + _platformUtilsService.LaunchUri("https://bitwarden.com/help/import-data/"); } public void WebVault() @@ -207,7 +207,7 @@ namespace Bit.App.Pages AppResources.LearnOrg, AppResources.Yes, AppResources.Cancel); if (confirmed) { - _platformUtilsService.LaunchUri("https://help.bitwarden.com/article/what-is-an-organization/"); + _platformUtilsService.LaunchUri("https://bitwarden.com/help/about-organizations/"); } } @@ -217,7 +217,7 @@ namespace Bit.App.Pages AppResources.TwoStepLogin, AppResources.Yes, AppResources.Cancel); if (confirmed) { - _platformUtilsService.LaunchUri("https://help.bitwarden.com/article/setup-two-step-login/"); + _platformUtilsService.LaunchUri("https://bitwarden.com/help/setup-two-step-login/"); } } @@ -227,7 +227,7 @@ namespace Bit.App.Pages AppResources.ChangeMasterPassword, AppResources.Yes, AppResources.Cancel); if (confirmed) { - _platformUtilsService.LaunchUri("https://help.bitwarden.com/article/change-your-master-password/"); + _platformUtilsService.LaunchUri("https://bitwarden.com/help/master-password/#change-your-master-password"); } } diff --git a/src/App/Pages/Vault/AddEditPageViewModel.cs b/src/App/Pages/Vault/AddEditPageViewModel.cs index 52d648b38..2e8925b00 100644 --- a/src/App/Pages/Vault/AddEditPageViewModel.cs +++ b/src/App/Pages/Vault/AddEditPageViewModel.cs @@ -759,7 +759,7 @@ namespace Bit.App.Pages public void PasswordPromptHelp() { - _platformUtilsService.LaunchUri("https://bitwarden.com/help/article/managing-items/#protect-individual-items"); + _platformUtilsService.LaunchUri("https://bitwarden.com/help/managing-items/#protect-individual-items"); } private void TypeChanged() diff --git a/src/App/Pages/Vault/AttachmentsPageViewModel.cs b/src/App/Pages/Vault/AttachmentsPageViewModel.cs index 08f859202..8480221c2 100644 --- a/src/App/Pages/Vault/AttachmentsPageViewModel.cs +++ b/src/App/Pages/Vault/AttachmentsPageViewModel.cs @@ -78,7 +78,7 @@ namespace Bit.App.Pages AppResources.FeatureUnavailable, AppResources.LearnMore, AppResources.Cancel); if (confirmed) { - _platformUtilsService.LaunchUri("https://help.bitwarden.com/article/update-encryption-key/"); + _platformUtilsService.LaunchUri("https://bitwarden.com/help/account-encryption-key/#rotate-your-encryption-key"); } } } From 76f10579515b49b5319c1516f1b8dc8ef7be6685 Mon Sep 17 00:00:00 2001 From: Federico Maccaroni Date: Wed, 9 Feb 2022 14:22:04 -0300 Subject: [PATCH 07/17] Improved Autofocus code on ScanPage for better cancellation and exception handling #1228 (#1759) --- src/App/Pages/Vault/ScanPage.xaml.cs | 46 ++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/src/App/Pages/Vault/ScanPage.xaml.cs b/src/App/Pages/Vault/ScanPage.xaml.cs index 981bb391c..cb7092a9c 100644 --- a/src/App/Pages/Vault/ScanPage.xaml.cs +++ b/src/App/Pages/Vault/ScanPage.xaml.cs @@ -1,5 +1,8 @@ using System; using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AppCenter.Crashes; using Xamarin.Forms; namespace Bit.App.Pages @@ -8,9 +11,6 @@ namespace Bit.App.Pages { private readonly Action _callback; - private DateTime? _timerStarted = null; - private TimeSpan _timerMaxLength = TimeSpan.FromMinutes(3); - public ScanPage(Action callback) { _callback = callback; @@ -27,26 +27,54 @@ namespace Bit.App.Pages ToolbarItems.RemoveAt(0); } } + private CancellationTokenSource _autofocusCts; protected override void OnAppearing() { base.OnAppearing(); _zxing.IsScanning = true; - _timerStarted = DateTime.Now; - Device.StartTimer(new TimeSpan(0, 0, 2), () => + + // Fix for Autofocus, now it's done every 2 seconds so that the user does't have to do it + // https://github.com/Redth/ZXing.Net.Mobile/issues/414 + _autofocusCts?.Cancel(); + _autofocusCts = new CancellationTokenSource(); + + var autofocusCts = _autofocusCts; + + Task.Run(async () => { - if (_timerStarted == null || (DateTime.Now - _timerStarted) > _timerMaxLength) + await Task.Delay(TimeSpan.FromMinutes(3), autofocusCts.Token); + autofocusCts.Cancel(); + }); + + Device.StartTimer(TimeSpan.FromSeconds(2), () => + { + try { + if (autofocusCts.IsCancellationRequested) + { + return false; + } + + _zxing.AutoFocus(); + return true; + } + catch (Exception ex) + { + // we don't need to display anything to the user because at the most they just lose autofocus +#if !FDROID + Crashes.TrackError(ex); +#endif + autofocusCts?.Cancel(); // we also cancel here to cancel the Task.Delay as well. return false; } - _zxing.AutoFocus(); - return true; }); } protected override void OnDisappearing() { - _timerStarted = null; + _autofocusCts?.Cancel(); + _zxing.IsScanning = false; base.OnDisappearing(); } From ee69364b1d72d16e73c36c58e3b2adf01d5b7efb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Feb 2022 06:46:19 -0800 Subject: [PATCH 08/17] Bumped version to 2.16.0 (#1760) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/Android/Properties/AndroidManifest.xml | 2 +- src/iOS.Autofill/Info.plist | 2 +- src/iOS.Extension/Info.plist | 2 +- src/iOS/Info.plist | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Android/Properties/AndroidManifest.xml b/src/Android/Properties/AndroidManifest.xml index 0f6dd1eff..376c483f0 100644 --- a/src/Android/Properties/AndroidManifest.xml +++ b/src/Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/src/iOS.Autofill/Info.plist b/src/iOS.Autofill/Info.plist index 230886826..80c8d8ac2 100644 --- a/src/iOS.Autofill/Info.plist +++ b/src/iOS.Autofill/Info.plist @@ -11,7 +11,7 @@ CFBundleIdentifier com.8bit.bitwarden.autofill CFBundleShortVersionString - 2.15.1 + 2.16.0 CFBundleVersion 1 CFBundleLocalizations diff --git a/src/iOS.Extension/Info.plist b/src/iOS.Extension/Info.plist index c5a2465cb..40c600f7d 100644 --- a/src/iOS.Extension/Info.plist +++ b/src/iOS.Extension/Info.plist @@ -11,7 +11,7 @@ CFBundleIdentifier com.8bit.bitwarden.find-login-action-extension CFBundleShortVersionString - 2.15.1 + 2.16.0 CFBundleLocalizations en diff --git a/src/iOS/Info.plist b/src/iOS/Info.plist index 75ac9da43..87ef52677 100644 --- a/src/iOS/Info.plist +++ b/src/iOS/Info.plist @@ -11,7 +11,7 @@ CFBundleIdentifier com.8bit.bitwarden CFBundleShortVersionString - 2.15.1 + 2.16.0 CFBundleVersion 1 CFBundleIconName From 54ccc1cbcad0f304b11efe11c87d9929311aa4b7 Mon Sep 17 00:00:00 2001 From: Joseph Flinn <58369717+joseph-flinn@users.noreply.github.com> Date: Thu, 10 Feb 2022 07:54:43 -0800 Subject: [PATCH 09/17] Add iOS Share Extension to our version bump automation (#1761) --- .github/workflows/version-bump.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index d6a40293f..0b5c86e46 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -44,6 +44,12 @@ jobs: version: ${{ github.event.inputs.version_number }} file_path: "./src/iOS.Extension/Info.plist" + - name: Bump Version - iOS.ShareExtension + uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945 + with: + version: ${{ github.event.inputs.version_number }} + file_path: "./src/iOS.ShareExtension/Info.plist" + - name: Bump Version - iOS uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945 with: From 15db96b06cbe108d1df21da0f66d8e56b7792dd9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Feb 2022 08:19:02 -0800 Subject: [PATCH 10/17] Bumped version to 2.16.1 (#1762) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/Android/Properties/AndroidManifest.xml | 2 +- src/iOS.Autofill/Info.plist | 2 +- src/iOS.Extension/Info.plist | 2 +- src/iOS.ShareExtension/Info.plist | 2 +- src/iOS/Info.plist | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Android/Properties/AndroidManifest.xml b/src/Android/Properties/AndroidManifest.xml index 376c483f0..b1cf97309 100644 --- a/src/Android/Properties/AndroidManifest.xml +++ b/src/Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/src/iOS.Autofill/Info.plist b/src/iOS.Autofill/Info.plist index 80c8d8ac2..c59f29b26 100644 --- a/src/iOS.Autofill/Info.plist +++ b/src/iOS.Autofill/Info.plist @@ -11,7 +11,7 @@ CFBundleIdentifier com.8bit.bitwarden.autofill CFBundleShortVersionString - 2.16.0 + 2.16.1 CFBundleVersion 1 CFBundleLocalizations diff --git a/src/iOS.Extension/Info.plist b/src/iOS.Extension/Info.plist index 40c600f7d..c1b8d581f 100644 --- a/src/iOS.Extension/Info.plist +++ b/src/iOS.Extension/Info.plist @@ -11,7 +11,7 @@ CFBundleIdentifier com.8bit.bitwarden.find-login-action-extension CFBundleShortVersionString - 2.16.0 + 2.16.1 CFBundleLocalizations en diff --git a/src/iOS.ShareExtension/Info.plist b/src/iOS.ShareExtension/Info.plist index bceb02f61..122c4e333 100644 --- a/src/iOS.ShareExtension/Info.plist +++ b/src/iOS.ShareExtension/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.14.2 + 2.16.1 CFBundleVersion 1 MinimumOSVersion diff --git a/src/iOS/Info.plist b/src/iOS/Info.plist index 87ef52677..46c564274 100644 --- a/src/iOS/Info.plist +++ b/src/iOS/Info.plist @@ -11,7 +11,7 @@ CFBundleIdentifier com.8bit.bitwarden CFBundleShortVersionString - 2.16.0 + 2.16.1 CFBundleVersion 1 CFBundleIconName From 9eed421c67faf9150a4f06421cc1d2272eefad2f Mon Sep 17 00:00:00 2001 From: Micaiah Martin <77340197+mimartin12@users.noreply.github.com> Date: Thu, 10 Feb 2022 09:42:57 -0700 Subject: [PATCH 11/17] Updated Sed expression for Android manifests (#1763) --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd4e02855..66dfb66c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: - name: Retrieve Mobile release version id: retrieve-mobile-version run: | - ver=$(sed -n -e '/android:versionName/ s/.*\= *//p' ./src/Android/Properties/AndroidManifest.xml | tr -d '"') + ver=$(sed -E -n '/^ Date: Thu, 10 Feb 2022 15:03:02 -0300 Subject: [PATCH 12/17] Improved code for periodic Autofocus on scan for better cancellation and task handlilng (#1764) --- src/App/Pages/Vault/ScanPage.xaml.cs | 39 ++++++++++++++-------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/App/Pages/Vault/ScanPage.xaml.cs b/src/App/Pages/Vault/ScanPage.xaml.cs index cb7092a9c..30d6fb09f 100644 --- a/src/App/Pages/Vault/ScanPage.xaml.cs +++ b/src/App/Pages/Vault/ScanPage.xaml.cs @@ -11,6 +11,9 @@ namespace Bit.App.Pages { private readonly Action _callback; + private CancellationTokenSource _autofocusCts; + private Task _continuousAutofocusTask; + public ScanPage(Action callback) { _callback = callback; @@ -27,7 +30,6 @@ namespace Bit.App.Pages ToolbarItems.RemoveAt(0); } } - private CancellationTokenSource _autofocusCts; protected override void OnAppearing() { @@ -37,45 +39,42 @@ namespace Bit.App.Pages // Fix for Autofocus, now it's done every 2 seconds so that the user does't have to do it // https://github.com/Redth/ZXing.Net.Mobile/issues/414 _autofocusCts?.Cancel(); - _autofocusCts = new CancellationTokenSource(); + _autofocusCts = new CancellationTokenSource(TimeSpan.FromMinutes(3)); var autofocusCts = _autofocusCts; - - Task.Run(async () => - { - await Task.Delay(TimeSpan.FromMinutes(3), autofocusCts.Token); - autofocusCts.Cancel(); - }); - - Device.StartTimer(TimeSpan.FromSeconds(2), () => + _continuousAutofocusTask = Task.Run(async () => { try { - if (autofocusCts.IsCancellationRequested) + while (!autofocusCts.IsCancellationRequested) { - return false; + await Task.Delay(TimeSpan.FromSeconds(2), autofocusCts.Token); + Device.BeginInvokeOnMainThread(() => + { + if (!autofocusCts.IsCancellationRequested) + { + _zxing.AutoFocus(); + } + }); } - - _zxing.AutoFocus(); - return true; } + catch (TaskCanceledException) { } catch (Exception ex) { - // we don't need to display anything to the user because at the most they just lose autofocus #if !FDROID Crashes.TrackError(ex); #endif - autofocusCts?.Cancel(); // we also cancel here to cancel the Task.Delay as well. - return false; } - }); + }, autofocusCts.Token); } - protected override void OnDisappearing() + protected override async void OnDisappearing() { _autofocusCts?.Cancel(); + await _continuousAutofocusTask; _zxing.IsScanning = false; + base.OnDisappearing(); } From 972755c725cb5aa154f367848dec8e9aad6d8c93 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Feb 2022 13:47:03 -0700 Subject: [PATCH 13/17] Bump version to 2.16.2 (#1765) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/Android/Properties/AndroidManifest.xml | 2 +- src/iOS.Autofill/Info.plist | 2 +- src/iOS.Extension/Info.plist | 2 +- src/iOS.ShareExtension/Info.plist | 2 +- src/iOS/Info.plist | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Android/Properties/AndroidManifest.xml b/src/Android/Properties/AndroidManifest.xml index b1cf97309..ac94e44cd 100644 --- a/src/Android/Properties/AndroidManifest.xml +++ b/src/Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/src/iOS.Autofill/Info.plist b/src/iOS.Autofill/Info.plist index c59f29b26..580392bfe 100644 --- a/src/iOS.Autofill/Info.plist +++ b/src/iOS.Autofill/Info.plist @@ -11,7 +11,7 @@ CFBundleIdentifier com.8bit.bitwarden.autofill CFBundleShortVersionString - 2.16.1 + 2.16.2 CFBundleVersion 1 CFBundleLocalizations diff --git a/src/iOS.Extension/Info.plist b/src/iOS.Extension/Info.plist index c1b8d581f..f5101b359 100644 --- a/src/iOS.Extension/Info.plist +++ b/src/iOS.Extension/Info.plist @@ -11,7 +11,7 @@ CFBundleIdentifier com.8bit.bitwarden.find-login-action-extension CFBundleShortVersionString - 2.16.1 + 2.16.2 CFBundleLocalizations en diff --git a/src/iOS.ShareExtension/Info.plist b/src/iOS.ShareExtension/Info.plist index 122c4e333..b57b6f7a3 100644 --- a/src/iOS.ShareExtension/Info.plist +++ b/src/iOS.ShareExtension/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.16.1 + 2.16.2 CFBundleVersion 1 MinimumOSVersion diff --git a/src/iOS/Info.plist b/src/iOS/Info.plist index 46c564274..b4d0003e7 100644 --- a/src/iOS/Info.plist +++ b/src/iOS/Info.plist @@ -11,7 +11,7 @@ CFBundleIdentifier com.8bit.bitwarden CFBundleShortVersionString - 2.16.1 + 2.16.2 CFBundleVersion 1 CFBundleIconName From 59ed76d956981d9e02e4d83219b02bdcfece909a Mon Sep 17 00:00:00 2001 From: Jake Fink Date: Fri, 11 Feb 2022 12:23:51 -0500 Subject: [PATCH 14/17] remove datepicker style workaround (#1768) --- .../Renderers/ExtendedDatePickerRenderer.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/iOS.Core/Renderers/ExtendedDatePickerRenderer.cs b/src/iOS.Core/Renderers/ExtendedDatePickerRenderer.cs index c2e3bcc78..15696fb57 100644 --- a/src/iOS.Core/Renderers/ExtendedDatePickerRenderer.cs +++ b/src/iOS.Core/Renderers/ExtendedDatePickerRenderer.cs @@ -23,19 +23,6 @@ namespace Bit.iOS.Core.Renderers { Control.Text = element.PlaceHolder; } - - // force use of wheel picker on iOS 14+ - // TODO remove this when we upgrade to X.F 5 SR-1 - // https://github.com/xamarin/Xamarin.Forms/issues/12258#issuecomment-700168665 - try - { - if (UIDevice.CurrentDevice.CheckSystemVersion(13, 2)) - { - var picker = (UIDatePicker)Control.InputView; - picker.PreferredDatePickerStyle = UIDatePickerStyle.Wheels; - } - } - catch { } } } From 15e9915da6c2adcba0b609f57953eb49f0b5627f Mon Sep 17 00:00:00 2001 From: Jake Fink Date: Fri, 11 Feb 2022 13:46:17 -0500 Subject: [PATCH 15/17] check email for null before authenticating (#1769) * check email for null before authenticating * add return after logging out and track error if email not found --- src/App/Pages/Accounts/LockPageViewModel.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/App/Pages/Accounts/LockPageViewModel.cs b/src/App/Pages/Accounts/LockPageViewModel.cs index 084b045fa..c2e48b771 100644 --- a/src/App/Pages/Accounts/LockPageViewModel.cs +++ b/src/App/Pages/Accounts/LockPageViewModel.cs @@ -10,6 +10,9 @@ using Bit.Core.Models.Domain; using Bit.Core.Models.Request; using Bit.Core.Utilities; using Xamarin.Forms; +#if !FDROID +using Microsoft.AppCenter.Crashes; +#endif namespace Bit.App.Pages { @@ -137,8 +140,17 @@ namespace Bit.App.Pages if (_usingKeyConnector && !(BiometricLock || PinLock)) { await _vaultTimeoutService.LogOutAsync(); + return; } _email = await _userService.GetEmailAsync(); + if (string.IsNullOrWhiteSpace(_email)) + { + await _vaultTimeoutService.LogOutAsync(); +#if !FDROID + Crashes.TrackError(new NullReferenceException("Email not found in storage")); +#endif + return; + } var webVault = _environmentService.GetWebVaultUrl(); if (string.IsNullOrWhiteSpace(webVault)) { From e4230ac4f6de944e6535521d3964be9e6b183562 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 22:47:48 +0100 Subject: [PATCH 16/17] Autosync the updated translations (#1766) Co-authored-by: github-actions <> --- src/App/Resources/AppResources.bg.resx | 8 ++++---- src/App/Resources/AppResources.sv.resx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/App/Resources/AppResources.bg.resx b/src/App/Resources/AppResources.bg.resx index 233531ec5..1eecdafa7 100644 --- a/src/App/Resources/AppResources.bg.resx +++ b/src/App/Resources/AppResources.bg.resx @@ -140,7 +140,7 @@ Navigate back to the previous screen. - Битуорден + Bitwarden App name. Shouldn't ever change. @@ -182,11 +182,11 @@ Редактиране на папка - Е-поща + Имейл Short label for an email address. - Е-поща + Имейл адрес Full label for a email address. @@ -288,7 +288,7 @@ The title for the vault page. - Наименование + Име Label for an entity name. diff --git a/src/App/Resources/AppResources.sv.resx b/src/App/Resources/AppResources.sv.resx index 1c9e8146b..aa01d9678 100644 --- a/src/App/Resources/AppResources.sv.resx +++ b/src/App/Resources/AppResources.sv.resx @@ -333,7 +333,7 @@ Skicka - Synka + Synkronisering The title for the sync page. From 615136be96e9f1a6f20f684416138b9e22984bf5 Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Sat, 12 Feb 2022 06:27:37 -0600 Subject: [PATCH 17/17] [Icons] - BUG - Update groupings icon for collections (#1773) --- src/App/Pages/Vault/GroupingsPage/GroupingsPageListItem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/Pages/Vault/GroupingsPage/GroupingsPageListItem.cs b/src/App/Pages/Vault/GroupingsPage/GroupingsPageListItem.cs index d2fa0c46d..11e15677a 100644 --- a/src/App/Pages/Vault/GroupingsPage/GroupingsPageListItem.cs +++ b/src/App/Pages/Vault/GroupingsPage/GroupingsPageListItem.cs @@ -80,7 +80,7 @@ namespace Bit.App.Pages } else if (Collection != null) { - _icon = BitwardenIcons.Globe; + _icon = BitwardenIcons.Collection; } else if (Type != null) {