summaryrefslogtreecommitdiffstats
path: root/model/outgoing_webhook.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/outgoing_webhook.go')
-rw-r--r--model/outgoing_webhook.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/model/outgoing_webhook.go b/model/outgoing_webhook.go
index 8958dd5b0..9a1b89a85 100644
--- a/model/outgoing_webhook.go
+++ b/model/outgoing_webhook.go
@@ -100,6 +100,12 @@ func (o *OutgoingWebhook) IsValid() *AppError {
return NewAppError("OutgoingWebhook.IsValid", "Invalid callback urls", "")
}
+ for _, callback := range o.CallbackURLs {
+ if !IsValidHttpUrl(callback) {
+ return NewAppError("OutgoingWebhook.IsValid", "Invalid callback URLs. Each must be a valid URL and start with http:// or https://", "")
+ }
+ }
+
return nil
}