From 0a5eb1ae7525712c616208d55bed78680f0d3e71 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 28 May 2023 19:46:28 -0700 Subject: [PATCH] Properly encode qbittorrent credentials --- src/widgets/qbittorrent/proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/qbittorrent/proxy.js b/src/widgets/qbittorrent/proxy.js index e1ea7f901..f130c868b 100644 --- a/src/widgets/qbittorrent/proxy.js +++ b/src/widgets/qbittorrent/proxy.js @@ -8,7 +8,7 @@ const logger = createLogger("qbittorrentProxyHandler"); async function login(widget) { logger.debug("qBittorrent is rejecting the request, logging in."); const loginUrl = new URL(`${widget.url}/api/v2/auth/login`).toString(); - const loginBody = `username=${encodeURI(widget.username)}&password=${encodeURI(widget.password)}`; + const loginBody = `username=${encodeURIComponent(widget.username)}&password=${encodeURIComponent(widget.password)}`; const loginParams = { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" },