From 118e1e027ed7c9ffdf3035f56c12b26d9ffbce26 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Fri, 3 Nov 2023 00:34:53 +0100 Subject: [PATCH] upd: revert back to original, keep some modifications --- packages/frontend/src/pages/miauth.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/pages/miauth.vue b/packages/frontend/src/pages/miauth.vue index 391587e5bd..39352da369 100644 --- a/packages/frontend/src/pages/miauth.vue +++ b/packages/frontend/src/pages/miauth.vue @@ -50,7 +50,6 @@ import * as os from '@/os.js'; import { $i, login } from '@/account.js'; import { i18n } from '@/i18n.js'; import { definePageMetadata } from '@/scripts/page-metadata.js'; -import { appendQuery, query } from '@/scripts/url.js'; const props = defineProps<{ session: string; @@ -77,8 +76,9 @@ async function accept(): Promise { if (props.callback) { const cbUrl = new URL(props.callback); if (['javascript:', 'file:', 'data:', 'mailto:', 'tel:'].includes(cbUrl.protocol)) throw new Error('invalid url'); - console.log(props.callback, props.session); - location.href = appendQuery(props.callback, query({ session: props.session })); + cbUrl.searchParams.set('session', props.session); + console.log(cbUrl.href); + location.href = cbUrl.href; } }