fix: url-encode nzbget credentials (#2093)
This commit is contained in:
@@ -96,7 +96,7 @@ export class NzbGetIntegration extends DownloadClientIntegration {
|
|||||||
): Promise<ReturnType<NzbGetClient[CallType]>> {
|
): Promise<ReturnType<NzbGetClient[CallType]>> {
|
||||||
const username = this.getSecretValue("username");
|
const username = this.getSecretValue("username");
|
||||||
const password = this.getSecretValue("password");
|
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 });
|
const body = JSON.stringify({ method, params });
|
||||||
return await fetchWithTrustedCertificatesAsync(url, { method: "POST", body })
|
return await fetchWithTrustedCertificatesAsync(url, { method: "POST", body })
|
||||||
.then(async (response) => {
|
.then(async (response) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user