Fix base64 encoding for basic auth in calendar

This commit is contained in:
rejas 2021-03-14 19:38:03 +01:00
parent 30c7a24fc2
commit 52584f36d7

View File

@ -55,7 +55,7 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
} else if (auth.method === "digest") {
fetcher = new digest(auth.user, auth.pass).fetch(url, { headers: headers, httpsAgent: httpsAgent });
} else {
headers.Authorization = "Basic " + base64.encode(auth.user + ":" + auth.pass);
headers.Authorization = "Basic " + Buffer.from(auth.user + ":" + auth.pass).toString("base64");
}
}
if (fetcher === null) {