audit: enforce http for gnu ftpmirror

This commit is contained in:
Dominyk Tiller 2015-06-14 20:17:08 +01:00
parent 778c25b458
commit a047fc08d6

View File

@ -941,6 +941,11 @@ class ResourceAuditor
problem "Please use \"http://ftpmirror.gnu.org\" instead of #{url}." problem "Please use \"http://ftpmirror.gnu.org\" instead of #{url}."
end end
# GNU's ftpmirror does NOT support SSL/TLS.
if url =~ %r[^https://ftpmirror\.gnu\.org/]
problem "Please use http:// for #{url}"
end
if mirrors.include?(url) if mirrors.include?(url)
problem "URL should not be duplicated as a mirror: #{url}" problem "URL should not be duplicated as a mirror: #{url}"
end end
@ -950,9 +955,6 @@ class ResourceAuditor
# Check a variety of SSL/TLS URLs that don't consistently auto-redirect # Check a variety of SSL/TLS URLs that don't consistently auto-redirect
# or are overly common errors that need to be reduced & fixed over time. # or are overly common errors that need to be reduced & fixed over time.
urls.each do |p| urls.each do |p|
# Skip the main url link, as it can't be made SSL/TLS yet.
next if p =~ %r[/ftpmirror\.gnu\.org]
case p case p
when %r[^http://ftp\.gnu\.org/], when %r[^http://ftp\.gnu\.org/],
%r[^http://[^/]*\.apache\.org/], %r[^http://[^/]*\.apache\.org/],