From 703e423e048a975a5a6e222e5ba44dc9362dd1d3 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 12 Jul 2017 15:15:42 +0200 Subject: [PATCH] fix(external-endpoints): prevent the creation of an invalid file endpoint (#1021) --- api/cron/endpoint_sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/cron/endpoint_sync.go b/api/cron/endpoint_sync.go index 3401c6893..9fbb634dc 100644 --- a/api/cron/endpoint_sync.go +++ b/api/cron/endpoint_sync.go @@ -117,7 +117,7 @@ func (job endpointSyncJob) prepareSyncData(storedEndpoints, fileEndpoints []port } for idx, endpoint := range fileEndpoints { - if endpoint.Name == "" || endpoint.URL == "" { + if !isValidEndpoint(&endpoint) { job.logger.Printf("Invalid file endpoint definition, skipping. [name: %v] [url: %v]", endpoint.Name, endpoint.URL) continue }