Skip to content

Check if domain is CNAME to pages.github.com or directly to Fastly #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2016

Conversation

benbalter
Copy link
Contributor

This pull request expands the InvalidCNAME check to look for two additional conditions:

  1. The domain is a CNAME, but the CNAME is to page.github.com, not [username].github.io
  2. The domain is a CNAME, but the CNAME is to github.map.fastly.net directly, not to [username].github.io

In both cases, the misconfiguration makes it harder for us to prevent abuse at the DNS level.

To accomplish this, Domain#cname now returns a Domain object, rather than the CNAME string, allowing us to more easily run checks on the target domain (where the CNAME resolves to).

Fixes #40.

@benbalter benbalter self-assigned this Feb 16, 2016
@parkr
Copy link
Contributor

parkr commented Feb 16, 2016

Should these be errors? If I do a check!, what do I get?

@benbalter
Copy link
Contributor Author

what do I get?

I thought of this as simply extending the definition of what an Invalid CNAME entails, and as such, you get a Errors::InvalidCNAMEError.

@parkr
Copy link
Contributor

parkr commented Feb 16, 2016

Cool! Was checking it on my 📱. Looking on a slightly larger screen, all seems marvelous! :shipit:

benbalter added a commit that referenced this pull request Feb 16, 2016
Check if domain is CNAME to pages.github.com or directly to Fastly
@benbalter benbalter merged commit 3c1674f into master Feb 16, 2016
@benbalter benbalter deleted the check-cname branch February 16, 2016 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if domain is CNAME'd to pages.github.(com|io)
2 participants