Skip to content

Commit 67abe4a

Browse files
authored
Merge pull request #147 from github/update_https_rules
check for underscore for https
2 parents e1d29db + 396fb6d commit 67abe4a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

lib/github-pages-health-check/domain.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,11 @@ def enforces_https?
449449
def https_eligible?
450450
# Can't have any IP's which aren't GitHub's present.
451451
return false if non_github_pages_ip_present?
452-
# Must be a CNAME or point to our IPs.
453452

453+
# Can't have underscores in the domain name (Let's Encrypt does not allow it)
454+
return false if host.include?("_")
455+
456+
# Must be a CNAME or point to our IPs.
454457
# Only check the one domain if a CNAME. Don't check the parent domain.
455458
return true if cname_to_github_user_domain?
456459

lib/github-pages-health-check/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module GitHubPages
44
module HealthCheck
5-
VERSION = "1.18.0"
5+
VERSION = "1.18.1"
66
end
77
end

spec/github_pages_health_check/domain_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,12 @@
10421042

10431043
it { is_expected.to be_https_eligible }
10441044

1045+
context "with underscore domain" do
1046+
let(:domain) { "foo_bar.com" }
1047+
1048+
it { is_expected.not_to be_https_eligible }
1049+
end
1050+
10451051
context "with bad CAA records" do
10461052
let(:caa_domain) { "digicert.com" }
10471053
before(:each) { allow(subject.send(:caa)).to receive(:query) { [caa_packet] } }

0 commit comments

Comments
 (0)