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)
{
await _platformUtilsService.ShowDialogAsync(AppResources.MasterPasswordLengthValMessage,
await _platformUtilsService.ShowDialogAsync(string.Format(AppResources.MasterPasswordLengthValMessageX, Constants.MasterPasswordMinimumChars),
AppResources.MasterPasswordPolicyValidationTitle, AppResources.Ok);
return false;
}

View File

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

View File

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

View File

@ -1,6 +1,7 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// 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
// the code is regenerated.
@ -13,10 +14,12 @@ namespace Bit.App.Resources {
/// <summary>
/// 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>
[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.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class AppResources {
@ -3670,7 +3673,7 @@ namespace Bit.App.Resources {
}
/// <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>
public static string LogInWithAnotherDevice {
get {
@ -3787,11 +3790,11 @@ namespace Bit.App.Resources {
}
/// <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>
public static string MasterPasswordLengthValMessage {
public static string MasterPasswordLengthValMessageX {
get {
return ResourceManager.GetString("MasterPasswordLengthValMessage", resourceCulture);
return ResourceManager.GetString("MasterPasswordLengthValMessageX", resourceCulture);
}
}
@ -4020,17 +4023,6 @@ 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>
/// Looks up a localized string similar to You must log into the main Bitwarden app before you can use the extension..
/// </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>
/// Looks up a localized string similar to My vault.
/// </summary>

View File

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

View File

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