From 749eab85bdf2aaa3bddc56db2354f219b4939db9 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Wed, 11 Oct 2023 15:21:22 -0500 Subject: [PATCH] refactor: prevent callback send to /Tools/Update --- web/store/callback.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/store/callback.ts b/web/store/callback.ts index b27f1f236..6efb4c1e6 100644 --- a/web/store/callback.ts +++ b/web/store/callback.ts @@ -147,6 +147,10 @@ export const useCallbackStoreGeneric = ( // build and go to url const destinationUrl = new URL(url); destinationUrl.searchParams.set('data', encodeURI(encryptedMessage)); + // becacuse this route redirects to account.unraid.net/server/update-os we need to change it + if (destinationUrl.pathname === '/Tools/Update') { + destinationUrl.pathname = '/Main'; // don't go to "/" because that auto redirects to /Main or /Dashboard + } console.debug('[callback.send]', encryptedMessage, destinationUrl); if (newTab) { window.open(destinationUrl.toString(), '_blank');