1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 23:33:31 +00:00

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

* fix: change to 10

* work: 12!

* Update register.component.ts

* fix: whoops, missed a few

* fix: can't believe i missed this.

---------

Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
This commit is contained in:
Brandon Maharaj
2023-02-16 13:15:47 -05:00
committed by GitHub
parent 45b6ac81c3
commit 91600bb610
8 changed files with 35 additions and 8 deletions

View File

@@ -430,7 +430,14 @@
"message": "Master password retype is required."
},
"masterPasswordMinlength": {
"message": "Master password must be at least 8 characters long."
"message": "Master password must be at least $VALUE$ characters long.",
"description": "The Master Password must be at least a specific number of characters long.",
"placeholders": {
"value": {
"content": "$1",
"example": "8"
}
}
},
"masterPassDoesntMatch": {
"message": "Master password confirmation does not match."

View File

@@ -373,8 +373,10 @@ export class LoginCommand {
return this.updateTempPassword("Master password is required.\n");
}
if (masterPassword.length < 8) {
return this.updateTempPassword("Master password must be at least 8 characters long.\n");
if (masterPassword.length < Utils.minimumPasswordLength) {
return this.updateTempPassword(
`Master password must be at least ${Utils.minimumPasswordLength} characters long.\n`
);
}
// Strength & Policy Validation

View File

@@ -542,7 +542,14 @@
"message": "Master password retype is required."
},
"masterPasswordMinlength": {
"message": "Master password must be at least 8 characters long."
"message": "Master password must be at least $VALUE$ characters long.",
"description": "The Master Password must be at least a specific number of characters long.",
"placeholders": {
"value": {
"content": "$1",
"example": "8"
}
}
},
"masterPassDoesntMatch": {
"message": "Master password confirmation does not match."

View File

@@ -20,6 +20,7 @@ import { PasswordGenerationService } from "@bitwarden/common/abstractions/passwo
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
import { PolicyService } from "@bitwarden/common/abstractions/policy/policy.service.abstraction";
import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config";
import { Utils } from "@bitwarden/common/misc/utils";
import { EncString } from "@bitwarden/common/models/domain/enc-string";
import { MasterPasswordPolicyOptions } from "@bitwarden/common/models/domain/master-password-policy-options";
import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key";
@@ -112,7 +113,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
this.i18nService.t("masterPasswordMinlength")
this.i18nService.t("masterPasswordMinlength", Utils.minimumPasswordLength)
);
return false;
}

View File

@@ -698,7 +698,14 @@
"message": "Master password retype is required."
},
"masterPasswordMinlength": {
"message": "Master password must be at least 8 characters long."
"message": "Master password must be at least $VALUE$ characters long.",
"description": "The Master Password must be at least a specific number of characters long.",
"placeholders": {
"value": {
"content": "$1",
"example": "8"
}
}
},
"masterPassDoesntMatch": {
"message": "Master password confirmation does not match."