From 82a117c12b7c371cb4f862c73122db9a63707d70 Mon Sep 17 00:00:00 2001 From: Yuchen Ying Date: Sun, 30 Apr 2023 18:00:33 -0700 Subject: [PATCH] fix(notifications): always verify Telegram certificate (#893) --- internal/notification/telegram.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/internal/notification/telegram.go b/internal/notification/telegram.go index fae1834..ef61b86 100644 --- a/internal/notification/telegram.go +++ b/internal/notification/telegram.go @@ -2,7 +2,6 @@ package notification import ( "bytes" - "crypto/tls" "encoding/json" "fmt" "html" @@ -60,13 +59,7 @@ func (s *telegramSender) Send(event domain.NotificationEvent, payload domain.Not req.Header.Set("Content-Type", "application/json") //req.Header.Set("User-Agent", "autobrr") - t := &http.Transport{ - TLSClientConfig: &tls.Config{ - InsecureSkipVerify: true, - }, - } - - client := http.Client{Transport: t, Timeout: 30 * time.Second} + client := http.Client{Timeout: 30 * time.Second} res, err := client.Do(req) if err != nil { s.log.Error().Err(err).Msgf("telegram client request error: %v", event)