fix(sec): webhook SSRF-guard через Dialer.Control (закрытие DNS-rebinding TOCTOU)
This commit is contained in:
@@ -39,7 +39,10 @@ func NewDispatcher(store ChannelStore, cipher Decryptor) *Dispatcher {
|
||||
cipher: cipher,
|
||||
byType: map[string]Notifier{
|
||||
"telegram": &Telegram{BaseURL: "https://api.telegram.org", HTTP: &http.Client{Timeout: 15 * time.Second}},
|
||||
"webhook": &Webhook{HTTP: &http.Client{Timeout: 15 * time.Second}},
|
||||
"webhook": &Webhook{HTTP: &http.Client{
|
||||
Timeout: 15 * time.Second,
|
||||
Transport: newWebhookTransport(false),
|
||||
}},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user