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>2020-03-16 06:09:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-16 06:09:14 +0300
commit78fe72d153260c355fdfd533b125026cce310da7 (patch)
tree0d90106443bea87cc24e2834273ae6c8dcac0260 /lib/gitlab/url_blocker.rb
parent88797b994a7dfd9bfab2a5d5431f088f17078b9f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/url_blocker.rb')
-rw-r--r--lib/gitlab/url_blocker.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/url_blocker.rb b/lib/gitlab/url_blocker.rb
index 0adca34440c..88094839062 100644
--- a/lib/gitlab/url_blocker.rb
+++ b/lib/gitlab/url_blocker.rb
@@ -49,7 +49,7 @@ module Gitlab
return [uri, nil] unless address_info
ip_address = ip_address(address_info)
- return [uri, nil] if domain_whitelisted?(uri) || ip_whitelisted?(ip_address)
+ return [uri, nil] if domain_whitelisted?(uri) || ip_whitelisted?(ip_address, port: get_port(uri))
protected_uri_with_hostname = enforce_uri_hostname(ip_address, uri, dns_rebind_protection)
@@ -254,11 +254,11 @@ module Gitlab
end
def domain_whitelisted?(uri)
- Gitlab::UrlBlockers::UrlWhitelist.domain_whitelisted?(uri.normalized_host)
+ Gitlab::UrlBlockers::UrlWhitelist.domain_whitelisted?(uri.normalized_host, port: get_port(uri))
end
- def ip_whitelisted?(ip_address)
- Gitlab::UrlBlockers::UrlWhitelist.ip_whitelisted?(ip_address)
+ def ip_whitelisted?(ip_address, port: nil)
+ Gitlab::UrlBlockers::UrlWhitelist.ip_whitelisted?(ip_address, port: port)
end
def config