diff options
| author | Viktor Szakáts | 2015-03-16 23:55:11 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-03-17 13:31:08 +0000 |
| commit | d609f7cdf09d4607741019d11eda5aab54eb8c4e (patch) | |
| tree | 3e63e2e98b453dcfccae66ecda1941936ec73bca | |
| parent | 2b2e2d6bff23ff021112b2ebbbbaf99e0e20f0d0 (diff) | |
| download | homebrew-d609f7cdf09d4607741019d11eda5aab54eb8c4e.tar.bz2 | |
audit: enforce https for apache.org
- including all apache.org subdomains
- for `homepage` as well
Closes #37778.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 8 |
1 files changed, 6 insertions, 2 deletions
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/] |
