diff options
author | Rubén Dávila <ruben@gitlab.com> | 2017-03-18 20:56:05 +0300 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2017-03-20 17:19:19 +0300 |
commit | 67f4501f5f240974fa9bd4eba3e7e08cb1a63bf4 (patch) | |
tree | b389dbf96baa0e96e019cf6b4156559d5770413c /lib | |
parent | d048483795f1916e432d473151560143dc08dcab (diff) |
Merge branch 'ssrf' into 'security'
nil check for url_blocker?
See merge request !2076
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/url_blocker.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/url_blocker.rb b/lib/gitlab/url_blocker.rb index bb2f4edc1a0..7e14a566696 100644 --- a/lib/gitlab/url_blocker.rb +++ b/lib/gitlab/url_blocker.rb @@ -8,6 +8,8 @@ module Gitlab VALID_PORTS = [22, 80, 443].freeze def blocked_url?(url) + return false if url.nil? + blocked_ips = ["127.0.0.1", "::1", "0.0.0.0"] blocked_ips.concat(Socket.ip_address_list.map(&:ip_address)) |