Commit 7395831d authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'fj-fix-broken-master-url-blocker' into 'master'

Fix broken master because of security merge

Closes #65294

See merge request gitlab-org/gitlab-ce!31252
parents 58f09590 5738171a
...@@ -86,11 +86,8 @@ module Gitlab ...@@ -86,11 +86,8 @@ module Gitlab
# #
# The original hostname is used to validate the SSL, given in that scenario # The original hostname is used to validate the SSL, given in that scenario
# we'll be making the request to the IP address, instead of using the hostname. # we'll be making the request to the IP address, instead of using the hostname.
def enforce_uri_hostname(addrs_info, uri, hostname, dns_rebind_protection) def enforce_uri_hostname(ip_address, uri, hostname, dns_rebind_protection)
address = addrs_info.first return [uri, nil] unless dns_rebind_protection && ip_address && ip_address != hostname
ip_address = address.ip_address
return [uri, nil] unless dns_rebind_protection && ip_address != hostname
uri = uri.dup uri = uri.dup
uri.hostname = ip_address uri.hostname = ip_address
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment