Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-22 18:08:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-22 18:08:21 +0300
commit8099b2824b5c3316af68fd8a5b9247c676a6d38b (patch)
tree8dafc7d7cd75d1020ae30cc905e9852bc3bb9804 /lib/gitlab/url_blocker.rb
parentf7b08f4264cfe86b35051778699dafc55efdbf5d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/url_blocker.rb')
-rw-r--r--lib/gitlab/url_blocker.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/gitlab/url_blocker.rb b/lib/gitlab/url_blocker.rb
index ba36b332e5a..938ca3ca317 100644
--- a/lib/gitlab/url_blocker.rb
+++ b/lib/gitlab/url_blocker.rb
@@ -12,7 +12,6 @@ module Gitlab
class << self
# Validates the given url according to the constraints specified by arguments.
#
- # schemes - Array of URI schemes or `:none` if scheme must not be set.
# ports - Raises error if the given URL port is not between given ports.
# allow_localhost - Raises error if URL resolves to a localhost IP address and argument is false.
# allow_local_network - Raises error if URL resolves to a link-local address and argument is false.
@@ -230,12 +229,6 @@ module Gitlab
end
def validate_scheme(scheme, schemes)
- if schemes == :none
- return if scheme.nil?
-
- raise BlockedUrlError, "No scheme allowed but got `#{scheme}://`"
- end
-
if scheme.blank? || (schemes.any? && schemes.exclude?(scheme))
raise BlockedUrlError, "Only allowed schemes are #{schemes.join(', ')}"
end