1
0
قرینه از https://github.com/karl0ss/homepage.git synced 2025-06-11 13:55:07 +01:00

Properly encode qbittorrent credentials

This commit is contained in:
shamoon 2023-05-28 19:46:28 -07:00
والد 6dfddf739e
کامیت 0a5eb1ae75

مشاهده پرونده

@ -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" },