1
0
mirror of https://github.com/bitwarden/mobile.git synced 2025-02-26 02:51:25 +01:00

[SG-1022] Update min password requirements to 12 char (#2368)

* work: adjusted numbers to 12

* work: made string dynamic

* fix: spaces
This commit is contained in:
Brandon Maharaj 2023-02-16 13:15:40 -05:00 committed by GitHub
parent 8ec6c7f0f7
commit bf7d9b5646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 27 deletions

View File

@ -162,7 +162,7 @@ namespace Bit.App.Pages
{ {
if (MasterPassword.Length < Constants.MasterPasswordMinimumChars) if (MasterPassword.Length < Constants.MasterPasswordMinimumChars)
{ {
await _platformUtilsService.ShowDialogAsync(AppResources.MasterPasswordLengthValMessage, await _platformUtilsService.ShowDialogAsync(string.Format(AppResources.MasterPasswordLengthValMessageX, Constants.MasterPasswordMinimumChars),
AppResources.MasterPasswordPolicyValidationTitle, AppResources.Ok); AppResources.MasterPasswordPolicyValidationTitle, AppResources.Ok);
return false; return false;
} }

View File

@ -148,7 +148,7 @@ namespace Bit.App.Pages
} }
if (MasterPassword.Length < Constants.MasterPasswordMinimumChars) if (MasterPassword.Length < Constants.MasterPasswordMinimumChars)
{ {
await _platformUtilsService.ShowDialogAsync(AppResources.MasterPasswordLengthValMessage, await _platformUtilsService.ShowDialogAsync(string.Format(AppResources.MasterPasswordLengthValMessageX, Constants.MasterPasswordMinimumChars),
AppResources.AnErrorHasOccurred, AppResources.Ok); AppResources.AnErrorHasOccurred, AppResources.Ok);
return; return;
} }

View File

@ -152,7 +152,7 @@ namespace Bit.App.Pages
if (MasterPassword.Length < Constants.MasterPasswordMinimumChars) if (MasterPassword.Length < Constants.MasterPasswordMinimumChars)
{ {
await Page.DisplayAlert(AppResources.MasterPasswordPolicyValidationTitle, await Page.DisplayAlert(AppResources.MasterPasswordPolicyValidationTitle,
AppResources.MasterPasswordLengthValMessage, AppResources.Ok); string.Format(AppResources.MasterPasswordLengthValMessageX, Constants.MasterPasswordMinimumChars), AppResources.Ok);
return; return;
} }
} }

View File

@ -1,6 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -13,10 +14,12 @@ namespace Bit.App.Resources {
/// <summary> /// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc. /// A strongly-typed resource class, for looking up localized strings, etc.
/// This class was generated by MSBuild using the GenerateResource task.
/// To add or remove a member, edit your .resx file then rerun MSBuild.
/// </summary> /// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Build.Tasks.StronglyTypedResourceBuilder", "15.1.0.0")] // This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class AppResources { public class AppResources {
@ -3670,7 +3673,7 @@ namespace Bit.App.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Log In with another device. /// Looks up a localized string similar to Log in with device.
/// </summary> /// </summary>
public static string LogInWithAnotherDevice { public static string LogInWithAnotherDevice {
get { get {
@ -3787,11 +3790,11 @@ namespace Bit.App.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Master password must be at least 8 characters long.. /// Looks up a localized string similar to Master password must be at least {0} characters long..
/// </summary> /// </summary>
public static string MasterPasswordLengthValMessage { public static string MasterPasswordLengthValMessageX {
get { get {
return ResourceManager.GetString("MasterPasswordLengthValMessage", resourceCulture); return ResourceManager.GetString("MasterPasswordLengthValMessageX", resourceCulture);
} }
} }
@ -4019,18 +4022,7 @@ namespace Bit.App.Resources {
return ResourceManager.GetString("Ms", resourceCulture); return ResourceManager.GetString("Ms", resourceCulture);
} }
} }
/// <summary>
/// Looks up a localized string similar to Mx.
/// </summary>
public static string Mx
{
get
{
return ResourceManager.GetString("Mx", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to You must log into the main Bitwarden app before you can use the extension.. /// Looks up a localized string similar to You must log into the main Bitwarden app before you can use the extension..
/// </summary> /// </summary>
@ -4049,6 +4041,15 @@ namespace Bit.App.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Mx.
/// </summary>
public static string Mx {
get {
return ResourceManager.GetString("Mx", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to My vault. /// Looks up a localized string similar to My vault.
/// </summary> /// </summary>

View File

@ -583,8 +583,8 @@
<data name="MasterPasswordHintDescription" xml:space="preserve"> <data name="MasterPasswordHintDescription" xml:space="preserve">
<value>A master password hint can help you remember your password if you forget it.</value> <value>A master password hint can help you remember your password if you forget it.</value>
</data> </data>
<data name="MasterPasswordLengthValMessage" xml:space="preserve"> <data name="MasterPasswordLengthValMessageX" xml:space="preserve">
<value>Master password must be at least 8 characters long.</value> <value>Master password must be at least {0} characters long.</value>
</data> </data>
<data name="MinNumbers" xml:space="preserve"> <data name="MinNumbers" xml:space="preserve">
<value>Minimum numbers</value> <value>Minimum numbers</value>
@ -2146,7 +2146,7 @@ Scanning will happen automatically.</value>
<data name="VaultTimeoutToLarge" xml:space="preserve"> <data name="VaultTimeoutToLarge" xml:space="preserve">
<value>Your vault timeout exceeds the restrictions set by your organization.</value> <value>Your vault timeout exceeds the restrictions set by your organization.</value>
</data> </data>
<data name="DisablePersonalVaultExportPolicyInEffect"> <data name="DisablePersonalVaultExportPolicyInEffect" xml:space="preserve">
<value>One or more organization policies prevents your from exporting your individual vault.</value> <value>One or more organization policies prevents your from exporting your individual vault.</value>
</data> </data>
<data name="AddAccount" xml:space="preserve"> <data name="AddAccount" xml:space="preserve">

View File

@ -54,7 +54,7 @@
public const int Argon2Iterations = 3; public const int Argon2Iterations = 3;
public const int Argon2MemoryInMB = 64; public const int Argon2MemoryInMB = 64;
public const int Argon2Parallelism = 4; public const int Argon2Parallelism = 4;
public const int MasterPasswordMinimumChars = 8; public const int MasterPasswordMinimumChars = 12;
public static readonly string[] AndroidAllClearCipherCacheKeys = public static readonly string[] AndroidAllClearCipherCacheKeys =
{ {