From 3b075c9c441e8fe2d7446a7201cd1950437ba0b6 Mon Sep 17 00:00:00 2001 From: Eiichi Yoshikawa Date: Tue, 16 Jul 2024 08:38:42 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20MkSignin.vue=E3=81=AEcredentia?= =?UTF-8?q?lRequest=E3=81=8B=E3=82=89Reactivity=E3=82=92=E5=89=8A=E9=99=A4?= =?UTF-8?q?=20(#14223)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove reactivity from credentialRequest in MkSignin.vue * Update Changelog --- CHANGELOG.md | 1 + packages/frontend/src/components/MkSignin.vue | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 058aa3371..53bf9233f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ - Fix: テーマプレビューが見れない問題を修正 - Fix: ショートカットキーが連打できる問題を修正 (Cherry-picked from https://github.com/taiyme/misskey/pull/234) +- Fix: MkSignin.vueのcredentialRequestからReactivityを削除(ProxyがPasskey認証処理に渡ることを避けるため) ### Server - Feat: レートリミット制限に引っかかったときに`Retry-After`ヘッダーを返すように (#13949) diff --git a/packages/frontend/src/components/MkSignin.vue b/packages/frontend/src/components/MkSignin.vue index a123bbddc..781145e1b 100644 --- a/packages/frontend/src/components/MkSignin.vue +++ b/packages/frontend/src/components/MkSignin.vue @@ -87,7 +87,7 @@ const host = ref(toUnicode(configHost)); const totpLogin = ref(false); const isBackupCode = ref(false); const queryingKey = ref(false); -const credentialRequest = ref(null); +let credentialRequest: CredentialRequestOptions | null = null; const emit = defineEmits<{ (ev: 'login', v: any): void; @@ -122,14 +122,14 @@ function onLogin(res: any): Promise | void { } async function queryKey(): Promise { - if (credentialRequest.value == null) return; + if (credentialRequest == null) return; queryingKey.value = true; - await webAuthnRequest(credentialRequest.value) + await webAuthnRequest(credentialRequest) .catch(() => { queryingKey.value = false; return Promise.reject(null); }).then(credential => { - credentialRequest.value = null; + credentialRequest = null; queryingKey.value = false; signing.value = true; return misskeyApi('signin', { @@ -160,7 +160,7 @@ function onSubmit(): void { }).then(res => { totpLogin.value = true; signing.value = false; - credentialRequest.value = parseRequestOptionsFromJSON({ + credentialRequest = parseRequestOptionsFromJSON({ publicKey: res, }); })