From ae65922253643bf8f4aa4ab33f63f3424892cad6 Mon Sep 17 00:00:00 2001 From: Penelope Gwen / Pogmommy Date: Thu, 19 Dec 2024 20:31:07 -0800 Subject: [PATCH] decoded plaintext credentials before params get re-encoded in ssApiClient (#862) --- src/renderer/api/subsonic/subsonic-api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/api/subsonic/subsonic-api.ts b/src/renderer/api/subsonic/subsonic-api.ts index 4fe383a0..aba4c02f 100644 --- a/src/renderer/api/subsonic/subsonic-api.ts +++ b/src/renderer/api/subsonic/subsonic-api.ts @@ -295,12 +295,12 @@ export const ssApiClient = (args: { const token = server.credential; const params = token.split(/&?\w=/gm); - authParams.u = server.username; + authParams.u = decodeURIComponent(server.username); if (params?.length === 4) { authParams.s = params[2]; authParams.t = params[3]; } else if (params?.length === 3) { - authParams.p = params[2]; + authParams.p = decodeURIComponent(params[2]); } } else { baseUrl = url;