add port check

This commit is contained in:
Pete Matsyburka committed 2026-02-15 12:18:53 +02:00
1 parent bdd33c7d6b
commit a999109a5c
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ class SendTestWebhookRequestJob
Addressable::URI.parse(webhook_url.url).normalize
end
raise HttpsError, 'Only HTTPS is allowed.' if uri.scheme != 'https'
raise HttpsError, 'Only HTTPS is allowed.' if uri.scheme != 'https' || uri.port != 443
raise LocalhostError, "Can't send to localhost." if uri.host.in?(SendWebhookRequest::LOCALHOSTS)
end