mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
fix(external-endpoints): prevent the creation of an invalid file endpoint (#1021)
This commit is contained in:
parent
780fec8e36
commit
703e423e04
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ func (job endpointSyncJob) prepareSyncData(storedEndpoints, fileEndpoints []port
|
||||||
}
|
}
|
||||||
|
|
||||||
for idx, endpoint := range fileEndpoints {
|
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)
|
job.logger.Printf("Invalid file endpoint definition, skipping. [name: %v] [url: %v]", endpoint.Name, endpoint.URL)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue