Skip to content
Snippets Groups Projects
Commit 78d47070 authored by Rubén Dávila's avatar Rubén Dávila Committed by Ruben Davila
Browse files

Merge branch 'ssrf' into 'security'

nil check for url_blocker?

See merge request !2076
parent a70346fc
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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))
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment