From e54324544da7effee5f9585e021f53eb3172e0a8 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Wed, 23 Apr 2025 16:17:07 +0800 Subject: [PATCH] ignore most staff TXT records + reserve more --- dnsconfig.js | 5 +++++ domains/_discord.json | 9 --------- domains/_gh-is-a-dev-o.json | 9 --------- domains/_github-pages-challenge-is-a-dev.data.json | 9 --------- domains/_github-pages-challenge-is-a-dev.docs.json | 9 --------- domains/_github-pages-challenge-is-a-dev.json | 10 ---------- domains/_github-pages-challenge-is-a-dev.raw.json | 9 --------- domains/discord.json | 9 --------- domains/github.json | 9 --------- tests/records.test.js | 8 ++++++-- util/reserved.json | 4 ++++ 11 files changed, 15 insertions(+), 75 deletions(-) delete mode 100644 domains/_discord.json delete mode 100644 domains/_gh-is-a-dev-o.json delete mode 100644 domains/_github-pages-challenge-is-a-dev.data.json delete mode 100644 domains/_github-pages-challenge-is-a-dev.docs.json delete mode 100644 domains/_github-pages-challenge-is-a-dev.json delete mode 100644 domains/_github-pages-challenge-is-a-dev.raw.json delete mode 100644 domains/discord.json delete mode 100644 domains/github.json diff --git a/dnsconfig.js b/dnsconfig.js index 947e2e6da..3ba37c717 100644 --- a/dnsconfig.js +++ b/dnsconfig.js @@ -162,7 +162,12 @@ var ignored = [ IGNORE("@", "*"), IGNORE("_acme-challenge", "TXT"), IGNORE("_autodiscover._tcp", "SRV"), + IGNORE("_discord", "TXT"), IGNORE("_dmarc", "TXT"), + IGNORE("_gh-is-a-dev-o", "TXT"), + IGNORE("_gh-is-a-dev-o.**", "TXT"), + IGNORE("_github-pages-challenge-is-a-dev", "TXT"), + IGNORE("_github-pages-challenge-is-a-dev.**", "TXT"), IGNORE("_psl", "TXT"), IGNORE("autoconfig", "CNAME"), IGNORE("autodiscover", "CNAME"), diff --git a/domains/_discord.json b/domains/_discord.json deleted file mode 100644 index 7b48822dc..000000000 --- a/domains/_discord.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "is-a-dev", - "email": "admin@is-a.dev" - }, - "record": { - "TXT": ["dh=d5273eca7d19d9a734f62376816c287bc2613ef7"] - } -} diff --git a/domains/_gh-is-a-dev-o.json b/domains/_gh-is-a-dev-o.json deleted file mode 100644 index b52a2f700..000000000 --- a/domains/_gh-is-a-dev-o.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "is-a-dev", - "email": "admin@is-a.dev" - }, - "record": { - "TXT": "9ac06a2c1c" - } -} diff --git a/domains/_github-pages-challenge-is-a-dev.data.json b/domains/_github-pages-challenge-is-a-dev.data.json deleted file mode 100644 index 005bed746..000000000 --- a/domains/_github-pages-challenge-is-a-dev.data.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "is-a-dev", - "email": "admin@is-a.dev" - }, - "record": { - "TXT": "9b2dd0cf1f2f48466e165d39351c97" - } -} diff --git a/domains/_github-pages-challenge-is-a-dev.docs.json b/domains/_github-pages-challenge-is-a-dev.docs.json deleted file mode 100644 index 888f8178b..000000000 --- a/domains/_github-pages-challenge-is-a-dev.docs.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "is-a-dev", - "email": "admin@is-a.dev" - }, - "record": { - "TXT": "9aed675b73d2147d4bc644c3551ef9" - } -} diff --git a/domains/_github-pages-challenge-is-a-dev.json b/domains/_github-pages-challenge-is-a-dev.json deleted file mode 100644 index 6f3b68e72..000000000 --- a/domains/_github-pages-challenge-is-a-dev.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Requested by GitHub support for verification of a public suffix", - "owner": { - "username": "is-a-dev", - "email": "admin@is-a.dev" - }, - "record": { - "TXT": "aa6e2c0b-6ba9-486e-b632-b66f87e2862b" - } -} diff --git a/domains/_github-pages-challenge-is-a-dev.raw.json b/domains/_github-pages-challenge-is-a-dev.raw.json deleted file mode 100644 index 586d27003..000000000 --- a/domains/_github-pages-challenge-is-a-dev.raw.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "is-a-dev", - "email": "admin@is-a.dev" - }, - "record": { - "TXT": "451887dc71c60fef6eb91e9b1ac27d" - } -} diff --git a/domains/discord.json b/domains/discord.json deleted file mode 100644 index 1a31c458c..000000000 --- a/domains/discord.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "is-a-dev", - "email": "admin@is-a.dev" - }, - "record": { - "URL": "https://discord.gg/is-a-dev-830872854677422150" - } -} diff --git a/domains/github.json b/domains/github.json deleted file mode 100644 index e2c8dec17..000000000 --- a/domains/github.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "zarqizoubir", - "email": "zarqi.ezzoubair@etu.uae.ac.ma" - }, - "record": { - "CNAME": "zarqizoubir.github.io" - } -} diff --git a/tests/records.test.js b/tests/records.test.js index c7b417a88..f5f8a5c35 100644 --- a/tests/records.test.js +++ b/tests/records.test.js @@ -139,7 +139,10 @@ function validateRecordValues(t, data, file) { if (key === "CNAME") { t.true(isValidHostname(value), `${file}: Invalid hostname for ${key}`); - t.true(value !== file, `${file}: CNAME cannot point to itself`); + t.true(value !== `${subdomain}.is-a.dev`, `${file}: ${key} cannot point to itself`); + if (data.owner.username.toLowerCase() !== "is-a-dev") { + t.true(value !== "is-a.dev", `${file}: ${key} cannot point to is-a.dev`); + } } else if (key === "URL") { t.true( value.startsWith("http://") || value.startsWith("https://"), @@ -149,7 +152,8 @@ function validateRecordValues(t, data, file) { // Check for self-referencing redirects const urlHost = new URL(value).host; - t.false(urlHost === `${subdomain}.is-a.dev`, `${file}: URL cannot point to itself`); + t.true(isValidHostname(urlHost), `${file}: Invalid URL hostname for ${key}`); + t.false(urlHost === `${subdomain}.is-a.dev`, `${file}: ${key} cannot point to itself`); } } diff --git a/util/reserved.json b/util/reserved.json index 697ed3fec..6569d021f 100644 --- a/util/reserved.json +++ b/util/reserved.json @@ -21,6 +21,7 @@ "com", "dash", "dashboard", + "discord", "dns", "doc", "documentation", @@ -30,6 +31,9 @@ "file", "files", "get", + "git", + "github", + "gitlab", "help", "home", "host",