summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-12-10 12:03:01 +0000
committerRémy Coutable <remy@rymai.me>2018-12-10 12:03:01 +0000
commit5c5a5992c0602f14c7f4f43b5fc2756662fafb3c (patch)
tree656e734b2a497ab9b78ded23f40ffd35ea1c13b7 /lib
parent5f8a3302d6588b96e3108e02cb3b6a1092eb1644 (diff)
parent401be1d17fb839f68358581c0c74560bd4a24f8f (diff)
downloadgitlab-ce-5c5a5992c0602f14c7f4f43b5fc2756662fafb3c.tar.gz
Merge branch 'sh-ignore-arrays-url-sanitizer' into 'master'
Only allow strings in URL::Sanitizer.valid? Closes #55079 See merge request gitlab-org/gitlab-ce!23675
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/url_sanitizer.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/url_sanitizer.rb b/lib/gitlab/url_sanitizer.rb
index 035268bc4f2..880712de5fe 100644
--- a/lib/gitlab/url_sanitizer.rb
+++ b/lib/gitlab/url_sanitizer.rb
@@ -14,6 +14,7 @@ module Gitlab
def self.valid?(url)
return false unless url.present?
+ return false unless url.is_a?(String)
uri = Addressable::URI.parse(url.strip)