mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
check credential type explicitly when loading evaluator (#7791)
This commit is contained in:
@@ -195,7 +195,8 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
|
|||||||
options.type = policy.defaultType;
|
options.type = policy.defaultType;
|
||||||
}
|
}
|
||||||
|
|
||||||
const evaluator = options.type
|
const evaluator =
|
||||||
|
options.type == "password"
|
||||||
? new PasswordGeneratorOptionsEvaluator(policy)
|
? new PasswordGeneratorOptionsEvaluator(policy)
|
||||||
: new PassphraseGeneratorOptionsEvaluator(policy);
|
: new PassphraseGeneratorOptionsEvaluator(policy);
|
||||||
|
|
||||||
@@ -344,7 +345,8 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
|
|||||||
options: PasswordGeneratorOptions,
|
options: PasswordGeneratorOptions,
|
||||||
enforcedPolicyOptions: PasswordGeneratorPolicyOptions,
|
enforcedPolicyOptions: PasswordGeneratorPolicyOptions,
|
||||||
) {
|
) {
|
||||||
const evaluator = options.type
|
const evaluator =
|
||||||
|
options.type == "password"
|
||||||
? new PasswordGeneratorOptionsEvaluator(enforcedPolicyOptions)
|
? new PasswordGeneratorOptionsEvaluator(enforcedPolicyOptions)
|
||||||
: new PassphraseGeneratorOptionsEvaluator(enforcedPolicyOptions);
|
: new PassphraseGeneratorOptionsEvaluator(enforcedPolicyOptions);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user