From 4e153b804664e4fbc63ee5eb945c8096c809c6d5 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Fri, 24 Jan 2025 17:36:37 +0100 Subject: [PATCH] fix: url-encode nzbget credentials (#2093) --- .../src/download-client/nzbget/nzbget-integration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integrations/src/download-client/nzbget/nzbget-integration.ts b/packages/integrations/src/download-client/nzbget/nzbget-integration.ts index ca2215624..f09135348 100644 --- a/packages/integrations/src/download-client/nzbget/nzbget-integration.ts +++ b/packages/integrations/src/download-client/nzbget/nzbget-integration.ts @@ -96,7 +96,7 @@ export class NzbGetIntegration extends DownloadClientIntegration { ): Promise> { const username = this.getSecretValue("username"); const password = this.getSecretValue("password"); - const url = this.url(`/${username}:${password}/jsonrpc`); + const url = this.url(`/${encodeURIComponent(username)}:${encodeURIComponent(password)}/jsonrpc`); const body = JSON.stringify({ method, params }); return await fetchWithTrustedCertificatesAsync(url, { method: "POST", body }) .then(async (response) => {