mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-29 22:31:29 +01:00
added NotAllowedError to assertCredential in fido2
This commit is contained in:
parent
7d7549bef2
commit
7e257d58cf
@ -38,6 +38,7 @@ export class Fido2ClientService implements Fido2ClientServiceAbstraction {
|
||||
params: CreateCredentialParams,
|
||||
abortController = new AbortController()
|
||||
): Promise<CreateCredentialResult> {
|
||||
// debugger;
|
||||
const enableFido2VaultCredentials = await this.configService.getFeatureFlagBool(
|
||||
FeatureFlag.Fido2VaultCredentials
|
||||
);
|
||||
@ -200,6 +201,13 @@ export class Fido2ClientService implements Fido2ClientServiceAbstraction {
|
||||
throw new FallbackRequestedError();
|
||||
}
|
||||
|
||||
if (!params.sameOriginWithAncestors) {
|
||||
this.logService?.warning(
|
||||
`[Fido2Client] Invalid 'sameOriginWithAncestors' value: ${params.sameOriginWithAncestors}`
|
||||
);
|
||||
throw new DOMException("Invalid 'sameOriginWithAncestors' value", "NotAllowedError");
|
||||
}
|
||||
|
||||
const { domain: effectiveDomain } = parse(params.origin, { allowPrivateDomains: true });
|
||||
if (effectiveDomain == undefined) {
|
||||
this.logService?.warning(`[Fido2Client] Invalid origin: ${params.origin}`);
|
||||
|
Loading…
Reference in New Issue
Block a user