Skip to content

Commit 75494b5

Browse files
danilsomsikovDevtools-frontend LUCI CQ
authored andcommitted
Fix WebAuthn authenticator options copying.
In WebauthnPane, create a shallow copy of `#newAuthenticatorOptions` when adding a new authenticator to prevent unintended side effects. Bug: 443752807 Change-Id: I7e7cc65566a2137acb425810fd01775039461bee Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6948390 Reviewed-by: Philip Pfaffe <[email protected]> Commit-Queue: Danil Somsikov <[email protected]>
1 parent beedf76 commit 75494b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

front_end/panels/webauthn/WebauthnPane.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ export class WebauthnPaneImpl extends UI.Panel.Panel implements
748748
}
749749

750750
async #handleAddAuthenticatorButton(): Promise<void> {
751-
const options = this.#newAuthenticatorOptions;
751+
const options = {...this.#newAuthenticatorOptions};
752752
if (this.#model) {
753753
const authenticatorId = await this.#addAuthenticator(options);
754754
this.#activeAuthId = authenticatorId; // Newly added authenticator is automatically set as active.

0 commit comments

Comments
 (0)