Merge pull request #3564 from commitay/revert-https-audit
Partially revert "Add audit check for URL schema"
This commit is contained in:
commit
deb37497e9
@ -2,7 +2,6 @@ require "hbc/checkable"
|
||||
require "hbc/download"
|
||||
require "digest"
|
||||
require "utils/git"
|
||||
require "utils/curl"
|
||||
|
||||
module Hbc
|
||||
class Audit
|
||||
@ -31,7 +30,6 @@ module Hbc
|
||||
check_url
|
||||
check_generic_artifacts
|
||||
check_token_conflicts
|
||||
check_https_availability
|
||||
check_download
|
||||
check_single_pre_postflight
|
||||
check_single_uninstall_zap
|
||||
@ -277,17 +275,6 @@ module Hbc
|
||||
"#{core_tap.default_remote}/blob/master/Formula/#{cask.token}.rb"
|
||||
end
|
||||
|
||||
def check_https_availability
|
||||
check_url_for_https_availability(cask.url, user_agents: [cask.url.user_agent]) unless cask.url.to_s.empty?
|
||||
check_url_for_https_availability(cask.appcast) unless cask.appcast.to_s.empty?
|
||||
check_url_for_https_availability(cask.homepage) unless cask.homepage.to_s.empty?
|
||||
end
|
||||
|
||||
def check_url_for_https_availability(url_to_check, user_agents: [:default])
|
||||
problem = curl_check_http_content(url_to_check.to_s, user_agents: user_agents)
|
||||
add_error problem unless problem.nil?
|
||||
end
|
||||
|
||||
def check_download
|
||||
return unless download && cask.url
|
||||
odebug "Auditing download"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user