From 02cb05f22b4e66536409cd90dd7253d8ac7cd07d Mon Sep 17 00:00:00 2001 From: Viktor Szakáts Date: Mon, 16 Mar 2015 23:55:11 +0100 Subject: audit: enforce https for apache.org - including all apache.org subdomains - for `homepage` as well Closes Homebrew/homebrew#37778. Signed-off-by: Mike McQuaid --- Library/Homebrew/cmd/audit.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 2f099ea00..48752bb21 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -301,6 +301,10 @@ class FormulaAuditor problem "Github Pages links should be https:// (URL is #{homepage})." end + if homepage =~ %r[^http://[^/]*\.apache\.org/] + problem "Apache homepages should be https:// links (URL is #{homepage})." + end + # There's an auto-redirect here, but this mistake is incredibly common too. # Only applies to the homepage and subdomains for now, not the FTP links. if homepage =~ %r[^http://((?:build|cloud|developer|download|extensions|git|glade|help|library|live|nagios|news|people|projects|rt|static|wiki|www)\.)?gnome\.org] @@ -326,8 +330,8 @@ class FormulaAuditor case p when %r[^http://ftp\.gnu\.org/] problem "ftp.gnu.org urls should be https://, not http:// (url is #{p})." - when %r[^http://archive\.apache\.org/] - problem "archive.apache.org urls should be https://, not http (url is #{p})." + when %r[^http://[^/]*\.apache\.org/] + problem "Apache urls should be https://, not http (url is #{p})." when %r[^http://code\.google\.com/] problem "code.google.com urls should be https://, not http (url is #{p})." when %r[^http://fossies\.org/] -- cgit v1.2.3