mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
fix min character assignments for pw gen
This commit is contained in:
@@ -53,15 +53,26 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
|
|||||||
// sanitize
|
// sanitize
|
||||||
if (o.uppercase && o.minUppercase <= 0) {
|
if (o.uppercase && o.minUppercase <= 0) {
|
||||||
o.minUppercase = 1;
|
o.minUppercase = 1;
|
||||||
|
} else if (!o.uppercase) {
|
||||||
|
o.minUppercase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o.lowercase && o.minLowercase <= 0) {
|
if (o.lowercase && o.minLowercase <= 0) {
|
||||||
o.minLowercase = 1;
|
o.minLowercase = 1;
|
||||||
|
} else if (!o.lowercase) {
|
||||||
|
o.minLowercase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o.number && o.minNumber <= 0) {
|
if (o.number && o.minNumber <= 0) {
|
||||||
o.minNumber = 1;
|
o.minNumber = 1;
|
||||||
|
} else if (!o.number) {
|
||||||
|
o.minNumber = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o.special && o.minSpecial <= 0) {
|
if (o.special && o.minSpecial <= 0) {
|
||||||
o.minSpecial = 1;
|
o.minSpecial = 1;
|
||||||
|
} else if (!o.special) {
|
||||||
|
o.minSpecial = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!o.length || o.length < 1) {
|
if (!o.length || o.length < 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user