Skip to content

Commit 40f718c

Browse files
Added missing validation to bulk send validator
1 parent 8a19b1d commit 40f718c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

api/pkg/validators/message_handler_validator.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ func (validator MessageHandlerValidator) ValidateMessageBulkSend(ctx context.Con
198198
result.Add("attachments", fmt.Sprintf("attachment at index %d has an invalid url format", i))
199199
} else if parsedURL.Scheme != "http" && parsedURL.Scheme != "https" {
200200
result.Add("attachments", fmt.Sprintf("attachment at index %d must use http or https scheme", i))
201+
} else {
202+
if err := validateAttachmentURL(attachment.URL); err != nil {
203+
result.Add("attachments", fmt.Sprintf("attachment at index %d failed validation: %s", i, err.Error()))
204+
}
201205
}
202206
}
203207
}

0 commit comments

Comments
 (0)