mirror of
https://github.com/bitwarden/clients.git
synced 2026-02-03 18:09:33 -06:00
[PM-30675] Fix certain data fields being incorrect in account-restricted exports (#18531)
This commit is contained in:
parent
5d17d9ee71
commit
7f1c68a24d
@ -75,7 +75,7 @@ export class Fido2CredentialExport {
|
||||
domain.userDisplayName =
|
||||
req.userDisplayName != null ? new EncString(req.userDisplayName) : null;
|
||||
domain.discoverable = req.discoverable != null ? new EncString(req.discoverable) : null;
|
||||
domain.creationDate = req.creationDate;
|
||||
domain.creationDate = req.creationDate != null ? new Date(req.creationDate) : null;
|
||||
return domain;
|
||||
}
|
||||
|
||||
@ -111,10 +111,12 @@ export class Fido2CredentialExport {
|
||||
this.rpId = safeGetString(o.rpId);
|
||||
this.userHandle = safeGetString(o.userHandle);
|
||||
this.userName = safeGetString(o.userName);
|
||||
this.counter = safeGetString(String(o.counter));
|
||||
this.counter = safeGetString(o instanceof Fido2CredentialView ? String(o.counter) : o.counter);
|
||||
this.rpName = safeGetString(o.rpName);
|
||||
this.userDisplayName = safeGetString(o.userDisplayName);
|
||||
this.discoverable = safeGetString(String(o.discoverable));
|
||||
this.discoverable = safeGetString(
|
||||
o instanceof Fido2CredentialView ? String(o.discoverable) : o.discoverable,
|
||||
);
|
||||
this.creationDate = o.creationDate;
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +39,11 @@ export class LoginExport {
|
||||
domain.username = req.username != null ? new EncString(req.username) : null;
|
||||
domain.password = req.password != null ? new EncString(req.password) : null;
|
||||
domain.totp = req.totp != null ? new EncString(req.totp) : null;
|
||||
// Fido2credentials are currently not supported for exports.
|
||||
if (req.fido2Credentials != null) {
|
||||
domain.fido2Credentials = req.fido2Credentials.map((f2) =>
|
||||
Fido2CredentialExport.toDomain(f2),
|
||||
);
|
||||
}
|
||||
|
||||
return domain;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user