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
def verify_blocked_uri
Gitlab::UrlBlocker.validate!(
session[url_key],
**{
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
}
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
)
rescue Gitlab::UrlBlocker::BlockedUrlError => e
clear_session_data
......
......@@ -136,11 +136,9 @@ class Import::FogbugzController < Import::BaseController
def verify_blocked_uri
Gitlab::UrlBlocker.validate!(
params[:uri],
**{
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
}
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
)
rescue Gitlab::UrlBlocker::BlockedUrlError => e
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
def verify_blocked_uri
Gitlab::UrlBlocker.validate!(
provider_url,
{
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
}
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
)
rescue Gitlab::UrlBlocker::BlockedUrlError => e
session[access_token_key] = nil
......
......@@ -81,11 +81,9 @@ module Import
def blocked_url?
Gitlab::UrlBlocker.blocked_url?(
url,
{
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
}
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
)
end
......
......@@ -70,11 +70,9 @@ module Import
def blocked_url?
Gitlab::UrlBlocker.blocked_url?(
url,
{
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
}
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
)
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