summaryrefslogtreecommitdiff
path: root/app/models/clusters
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2019-03-04 18:36:50 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2019-03-04 18:36:50 +0000
commit03340f0987ac61ef4c884d4730e2fd3cbff113c5 (patch)
tree6c2fd54002575eaeb700b6979e1214408f77ea64 /app/models/clusters
parent6412a3e007eef5fa9ee0cdfd288200d4cc2ee06b (diff)
parentaf16fd687e2e5b15a63e6e51d76847512ae8ee72 (diff)
downloadgitlab-ce-03340f0987ac61ef4c884d4730e2fd3cbff113c5.tar.gz
Merge branch 'security-kubernetes-local-ssrf' into 'master'
Block local URLs for Kubernetes integration See merge request gitlab/gitlabhq!2901
Diffstat (limited to 'app/models/clusters')
-rw-r--r--app/models/clusters/platforms/kubernetes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/clusters/platforms/kubernetes.rb b/app/models/clusters/platforms/kubernetes.rb
index 46d0898014e..814fc591408 100644
--- a/app/models/clusters/platforms/kubernetes.rb
+++ b/app/models/clusters/platforms/kubernetes.rb
@@ -41,7 +41,7 @@ module Clusters
validate :no_namespace, unless: :allow_user_defined_namespace?
# We expect to be `active?` only when enabled and cluster is created (the api_url is assigned)
- validates :api_url, url: true, presence: true
+ validates :api_url, public_url: true, presence: true
validates :token, presence: true
validates :ca_cert, certificate: true, allow_blank: true, if: :ca_cert_changed?