Skip to content

Commit

Permalink
decoded plaintext credentials before params get re-encoded in ssApiCl…
Browse files Browse the repository at this point in the history
…ient (#862)
  • Loading branch information
pogmommy authored Dec 20, 2024
1 parent ca58551 commit ae65922
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/api/subsonic/subsonic-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ae65922

Please sign in to comment.