Addressable::URI.parse might return nil
This commit is contained in:
parent
ee1f9d899d
commit
afad81f927
|
@ -253,7 +253,7 @@ class Travis::Api::App
|
||||||
end
|
end
|
||||||
|
|
||||||
def target_ok?(target_origin)
|
def target_ok?(target_origin)
|
||||||
uri = Addressable::URI.parse(target_origin)
|
return unless uri = Addressable::URI.parse(target_origin)
|
||||||
if uri.host =~ /\A(.+\.)?travis-ci\.(com|org)\Z/
|
if uri.host =~ /\A(.+\.)?travis-ci\.(com|org)\Z/
|
||||||
uri.scheme == 'https'
|
uri.scheme == 'https'
|
||||||
elsif uri == 'localhost' or uri == '127.0.0.1'
|
elsif uri == 'localhost' or uri == '127.0.0.1'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user