diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-07-29 20:58:45 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-07-29 20:58:45 +0000 |
commit | 7395831dc4d2ee9f5d90ed2f528015eae11c7b17 (patch) | |
tree | a6c1f581cb5cade7f6115c497292779ee1aeea49 | |
parent | 58f09590987f06ce4f9c7715e68f25c57c22b8f3 (diff) | |
parent | 5738171aef09003bc919f5a8a99e1a2562c3c6ed (diff) | |
download | gitlab-ce-7395831dc4d2ee9f5d90ed2f528015eae11c7b17.tar.gz |
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
-rw-r--r-- | lib/gitlab/url_blocker.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/gitlab/url_blocker.rb b/lib/gitlab/url_blocker.rb index aac96377152..9c35d200dcb 100644 --- a/lib/gitlab/url_blocker.rb +++ b/lib/gitlab/url_blocker.rb @@ -86,11 +86,8 @@ module Gitlab # # 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. - def enforce_uri_hostname(addrs_info, uri, hostname, dns_rebind_protection) - address = addrs_info.first - ip_address = address.ip_address - - return [uri, nil] unless dns_rebind_protection && ip_address != hostname + def enforce_uri_hostname(ip_address, uri, hostname, dns_rebind_protection) + return [uri, nil] unless dns_rebind_protection && ip_address && ip_address != hostname uri = uri.dup uri.hostname = ip_address |