From b8dca4e273a5236734b08e8bfcb4c28ee4cdf18d Mon Sep 17 00:00:00 2001 From: Tit Petric Date: Thu, 9 Jan 2025 23:26:52 +0100 Subject: [PATCH] Move log after empty check, dont even log --- gateway/event_handler_webhooks.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gateway/event_handler_webhooks.go b/gateway/event_handler_webhooks.go index 5933a9b2a83..0e572efb829 100644 --- a/gateway/event_handler_webhooks.go +++ b/gateway/event_handler_webhooks.go @@ -161,12 +161,14 @@ func (w *WebHookHandler) getRequestMethod(m string) WebHookRequestMethod { } func (w *WebHookHandler) checkURL(r string) bool { - log.WithFields(logrus.Fields{ - "prefix": "webhooks", - }).Debug("Checking URL: ", r) if r == "" { return false } + + log.WithFields(logrus.Fields{ + "prefix": "webhooks", + }).Debug("Checking URL: ", r) + if _, err := url.ParseRequestURI(r); err != nil { log.WithFields(logrus.Fields{ "prefix": "webhooks",