Skip to content

Commit

Permalink
linkPreviews: Enforce TLS validity
Browse files Browse the repository at this point in the history
When a URL is prefixed with a TLS scheme, we should make sure
that the remote provides a valid cert, even just for prefetches.
Else MITM of such a site is trivial.

This probably breaks some people with self signed cert, but the
age where that was acceptable is past. We have free CAs now like
Let's Encrypt.
  • Loading branch information
brunnre8 committed Aug 6, 2022
1 parent 11f7ae9 commit 621fa92
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions server/plugins/irc-events/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,6 @@ function fetch(uri: string, headers: Record<string, string>) {
retry: 0,
timeout: prefetchTimeout || 5000, // milliseconds
headers: getRequestHeaders(headers),
https: {
rejectUnauthorized: false,
},
});

gotStream
Expand Down

0 comments on commit 621fa92

Please sign in to comment.