Skip to content

Commit f1e8be3

Browse files
refactor(fetcher): remove dead selfSignedCert code
Drop the unused self-signed certificate branch that disabled TLS verification via rejectUnauthorized: false. The option was not wired from configuration, so behavior is unchanged while removing a high-severity CodeQL finding: https://github.com/MagicMirrorModules/MMM-CalendarExt2/security/code-scanning/1
1 parent 116a828 commit f1e8be3

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

lib/calendar-fetcher.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const https = require("node:https");
21
const Log = require("logger");
32

43
/**
@@ -75,9 +74,6 @@ class CalendarFetcher {
7574
}
7675

7776
const headers = {"User-Agent": this.options.userAgent};
78-
const agent = this.options.selfSignedCert
79-
? new https.Agent({rejectUnauthorized: false})
80-
: null;
8177

8278
if (this.auth) {
8379
if (this.auth.method === "bearer") {
@@ -90,8 +86,7 @@ class CalendarFetcher {
9086
let delay = this.reloadInterval;
9187
try {
9288
const response = await fetch(this.url, {
93-
headers,
94-
agent
89+
headers
9590
});
9691
if (response.ok) {
9792
this.suspendUntil = null;

0 commit comments

Comments
 (0)