Commit 24eabccb authored by Vitali Tatarintev's avatar Vitali Tatarintev

Fixing kwargs deprecation warnings for 2.7

Fix kwargs warnings for:

* `Gitlab::UrlBlocker.validate!`
* `Gitlab::UrlBlocker.blocked_url?`
parent 27da16c9
...@@ -84,11 +84,9 @@ class Import::BulkImportsController < ApplicationController ...@@ -84,11 +84,9 @@ class Import::BulkImportsController < ApplicationController
def verify_blocked_uri def verify_blocked_uri
Gitlab::UrlBlocker.validate!( Gitlab::UrlBlocker.validate!(
session[url_key], session[url_key],
**{
allow_localhost: allow_local_requests?, allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?, allow_local_network: allow_local_requests?,
schemes: %w(http https) schemes: %w(http https)
}
) )
rescue Gitlab::UrlBlocker::BlockedUrlError => e rescue Gitlab::UrlBlocker::BlockedUrlError => e
clear_session_data clear_session_data
......
...@@ -136,11 +136,9 @@ class Import::FogbugzController < Import::BaseController ...@@ -136,11 +136,9 @@ class Import::FogbugzController < Import::BaseController
def verify_blocked_uri def verify_blocked_uri
Gitlab::UrlBlocker.validate!( Gitlab::UrlBlocker.validate!(
params[:uri], params[:uri],
**{
allow_localhost: allow_local_requests?, allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?, allow_local_network: allow_local_requests?,
schemes: %w(http https) schemes: %w(http https)
}
) )
rescue Gitlab::UrlBlocker::BlockedUrlError => e rescue Gitlab::UrlBlocker::BlockedUrlError => e
redirect_to new_import_fogbugz_url, alert: _('Specified URL cannot be used: "%{reason}"') % { reason: e.message } redirect_to new_import_fogbugz_url, alert: _('Specified URL cannot be used: "%{reason}"') % { reason: e.message }
......
...@@ -72,11 +72,9 @@ class Import::GiteaController < Import::GithubController ...@@ -72,11 +72,9 @@ class Import::GiteaController < Import::GithubController
def verify_blocked_uri def verify_blocked_uri
Gitlab::UrlBlocker.validate!( Gitlab::UrlBlocker.validate!(
provider_url, provider_url,
{
allow_localhost: allow_local_requests?, allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?, allow_local_network: allow_local_requests?,
schemes: %w(http https) schemes: %w(http https)
}
) )
rescue Gitlab::UrlBlocker::BlockedUrlError => e rescue Gitlab::UrlBlocker::BlockedUrlError => e
session[access_token_key] = nil session[access_token_key] = nil
......
...@@ -81,11 +81,9 @@ module Import ...@@ -81,11 +81,9 @@ module Import
def blocked_url? def blocked_url?
Gitlab::UrlBlocker.blocked_url?( Gitlab::UrlBlocker.blocked_url?(
url, url,
{
allow_localhost: allow_local_requests?, allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?, allow_local_network: allow_local_requests?,
schemes: %w(http https) schemes: %w(http https)
}
) )
end end
......
...@@ -70,11 +70,9 @@ module Import ...@@ -70,11 +70,9 @@ module Import
def blocked_url? def blocked_url?
Gitlab::UrlBlocker.blocked_url?( Gitlab::UrlBlocker.blocked_url?(
url, url,
{
allow_localhost: allow_local_requests?, allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?, allow_local_network: allow_local_requests?,
schemes: %w(http https) schemes: %w(http https)
}
) )
end end
......
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