From f775e55954f14ce5d8987a8ac0535b679049c75b Mon Sep 17 00:00:00 2001 From: JustDeveloper <176615419+JustDeveloper1@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:41:48 +0300 Subject: [PATCH 1/9] Update reserved.json --- util/reserved.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/reserved.json b/util/reserved.json index 8ac0501fd0..13b954c4f7 100644 --- a/util/reserved.json +++ b/util/reserved.json @@ -67,6 +67,8 @@ "helper[1-99]", "helpers", "hostmaster", + "http", + "https", "info", "infos", "int", From 18a4b8120a2179a58a7a915a0acfeccfbce905d8 Mon Sep 17 00:00:00 2001 From: JustDeveloper <176615419+JustDeveloper1@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:46:23 +0300 Subject: [PATCH 2/9] https://github.com/is-a-dev/register/pull/20801#issuecomment-2695781465 --- util/reserved.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/reserved.json b/util/reserved.json index 13b954c4f7..aae8f46340 100644 --- a/util/reserved.json +++ b/util/reserved.json @@ -16,6 +16,7 @@ "api", "apis", "auth", + "auth[1-99]", "authentication", "authorisation", "authorise", @@ -39,6 +40,8 @@ "con", "confirm", "confirmation", + "contribute", + "contributing", "dash", "dashboard", "default", @@ -149,6 +152,8 @@ "teams", "test", "test[1-9999]", + "terms", + "terms[1-99]", "termsofservice", "terms-of-service", "tld", From d59a92a49f3a81d9b69f1404608753b69b24d955 Mon Sep 17 00:00:00 2001 From: JustDeveloper <176615419+JustDeveloper1@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:47:56 +0300 Subject: [PATCH 3/9] Update reserved.json --- util/reserved.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/reserved.json b/util/reserved.json index aae8f46340..7e8dc36a14 100644 --- a/util/reserved.json +++ b/util/reserved.json @@ -71,7 +71,9 @@ "helpers", "hostmaster", "http", + "http[1-9999]", "https", + "https[1-9999]", "info", "infos", "int", From aec811cb280a9ac43793bb6a4e4d9c51109b176a Mon Sep 17 00:00:00 2001 From: JustDeveloper <176615419+JustDeveloper1@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:50:22 +0300 Subject: [PATCH 4/9] Update reserved.json --- util/reserved.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/util/reserved.json b/util/reserved.json index 7e8dc36a14..131dc9b700 100644 --- a/util/reserved.json +++ b/util/reserved.json @@ -10,6 +10,7 @@ "admin[1-99]", "admins", "administrator", + "administrator[1-99]", "administrators", "alert", "alerts", @@ -39,11 +40,15 @@ "com[1-9]", "con", "confirm", + "confirm[1-99]", "confirmation", "contribute", + "contribute[1-99]", "contributing", "dash", + "dash[1-99]", "dashboard", + "dashboard[1-99]", "default", "dns", "doc", @@ -160,13 +165,16 @@ "terms-of-service", "tld", "token", + "token[1-9999]", "tokens", "tos", + "tos[1-99]", "txt", "txt[1-9999]", "url", "url[1-9999]", "user", + "user[1-9999]", "users", "webmail", "webmaster", From 79d807cd016e31e3d198c18cd8a7e7a4da87c0a5 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Thu, 6 Mar 2025 20:52:29 +0800 Subject: [PATCH 5/9] updates --- tests/domains.test.js | 22 ---------------------- util/reserved.json | 16 ++-------------- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/tests/domains.test.js b/tests/domains.test.js index f1e4954a3d..cecb2159fe 100644 --- a/tests/domains.test.js +++ b/tests/domains.test.js @@ -81,25 +81,3 @@ t("Nested subdomains should be owned by the parent subdomain's owner", (t) => { } }); }); - -t("Subdomains containing an underscore can only have specific records", (t) => { - files.forEach((file) => { - const subdomain = file.replace(/\.json$/, ""); - - if (subdomain.includes("_")) { - const data = getDomainData(subdomain); - const recordKeys = Object.keys(data.record); - - if (subdomain.startsWith("_acme-challenge.") || subdomain.includes("._domainkey.")) { - t.true( - recordKeys.every((key) => new Set(["TXT", "CNAME"]).has(key)), - `${file}: This type of subdomain can only have TXT or CNAME records` - ); - } else if (subdomain.includes("._tcp.") || subdomain.includes("._udp.")) { - t.deepEqual(recordKeys, ["SRV"], `${file}: This type of subdomain can only have SRV records`); - } else { - t.deepEqual(recordKeys, ["TXT"], `${file}: Subdomains with underscores can only have TXT records`); - } - } - }); -}); diff --git a/util/reserved.json b/util/reserved.json index c87796c32d..e71a89d3ca 100644 --- a/util/reserved.json +++ b/util/reserved.json @@ -7,7 +7,6 @@ "account", "accounts", "admin", - "admin[1-99]", "admins", "administrator", "administrators", @@ -30,12 +29,10 @@ "chat", "checkout", "cname", - "cname[1-99]", "co", "codeofconduct", "code-of-conduct", "com", - "com[1-9]", "con", "confirm", "confirmation", @@ -54,7 +51,6 @@ "example", "feedback", "file", - "file[1-9999]", "files", "finance", "forgot", @@ -64,7 +60,6 @@ "help", "helpdesk", "helper", - "helper[1-99]", "helpers", "hostmaster", "info", @@ -75,7 +70,6 @@ "license", "login", "logout", - "lpt[1-9]", "m", "mail", "maintainer", @@ -84,7 +78,6 @@ "media", "mobile", "mod", - "mod[1-99]", "mods", "moderator", "moderators", @@ -96,10 +89,9 @@ "notifications", "notify", "ns", - "ns[1-99]", + "ns[1-9]", "nul", "oauth", - "oauth[1-99]", "official", "operations", "ops", @@ -134,7 +126,6 @@ "signout", "signup", "srv", - "srv[1-99]", "staff", "staging", "statistics", @@ -147,7 +138,6 @@ "system", "teams", "test", - "test[1-9999]", "termsofservice", "terms-of-service", "tld", @@ -155,15 +145,13 @@ "tokens", "tos", "txt", - "txt[1-9999]", "url", - "url[1-9999]", "user", "users", "webmail", "webmaster", "whois", - "www[1-99]", + "www[1-9]", "wwww", "your-domain-name" ] From 0fa85478d265daecf721f5372f14d5c7c8886ba3 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Thu, 6 Mar 2025 20:58:11 +0800 Subject: [PATCH 6/9] Update ci.yml --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a880e816bb..bc5bbb110d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,6 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - run: npm install From 7bece280c86bf90549eefcb58ba64bc2de5b771c Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Thu, 6 Mar 2025 21:04:31 +0800 Subject: [PATCH 7/9] fix tests --- .github/workflows/ci.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc5bbb110d..7a30fd8832 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,8 +24,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - run: npm install @@ -43,15 +41,11 @@ jobs: - name: Get changed files if: github.event_name == 'pull_request' - uses: actions/github-script@v6 - with: - script: | - const { execSync } = require("child_process"); - const files = execSync(`git diff --name-only HEAD HEAD~${context.payload.pull_request.commits}`) - .toString() - .split("\n") - .filter(Boolean); - core.exportVariable("CHANGED_FILES", JSON.stringify(files)); + run: | + FILES=$(gh api --jq '[.files[].filename]' /repos/{owner}/{repo}/pulls/${{ github.event.number }}/files) + echo "CHANGED_FILES=$FILES" >> $GITHUB_ENV + env: + GH_TOKEN: ${{ github.token }} - name: Run tests - run: npx ava tests/*.test.js --timeout=30s + run: npx ava tests/*.test.js --timeout=1m From 645a402f9a81250a21fce61c8d126fa5c6f73618 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Thu, 6 Mar 2025 21:08:07 +0800 Subject: [PATCH 8/9] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a30fd8832..1faaef82c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: - name: Get changed files if: github.event_name == 'pull_request' run: | - FILES=$(gh api --jq '[.files[].filename]' /repos/{owner}/{repo}/pulls/${{ github.event.number }}/files) + FILES=$(gh api --jq '[.[] | .filename]' /repos/{owner}/{repo}/pulls/${{ github.event.number }}/files) echo "CHANGED_FILES=$FILES" >> $GITHUB_ENV env: GH_TOKEN: ${{ github.token }} From cdcb6e728380f1f811ca12523763ae70ad34e036 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Thu, 6 Mar 2025 21:15:01 +0800 Subject: [PATCH 9/9] Update reserved.json --- util/reserved.json | 62 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 19 deletions(-) diff --git a/util/reserved.json b/util/reserved.json index d10f6cc31e..a64059d4a7 100644 --- a/util/reserved.json +++ b/util/reserved.json @@ -9,14 +9,12 @@ "admin", "admins", "administrator", - "administrator[1-99]", "administrators", "alert", "alerts", "api", "apis", "auth", - "auth[1-99]", "authentication", "authorisation", "authorise", @@ -37,15 +35,11 @@ "com", "con", "confirm", - "confirm[1-99]", "confirmation", "contribute", - "contribute[1-99]", "contributing", "dash", - "dash[1-99]", "dashboard", - "dashboard[1-99]", "default", "dns", "doc", @@ -63,25 +57,29 @@ "finance", "forgot", "forgot-password", - "gtld", - "guest", "help", "helpdesk", "helper", "helpers", "hostmaster", "http", - "http[1-9999]", "https", - "https[1-9999]", "info", - "infos", "int", "internal", "legal", "license", "login", "logout", + "lpt1", + "lpt2", + "lpt3", + "lpt4", + "lpt5", + "lpt6", + "lpt7", + "lpt8", + "lpt9", "m", "mail", "maintainer", @@ -101,16 +99,25 @@ "notifications", "notify", "ns", - "ns[1-9]", - "nul", + "ns1", + "ns2", + "ns3", + "ns4", + "ns5", + "ns6", + "ns7", + "ns8", + "ns9", "oauth", "official", - "operations", "ops", "org", "organisation", "organization", "owner", + "owners", + "passwordreset", + "password-reset", "pay", "payment", "payments", @@ -123,12 +130,14 @@ "registrar", "registry", "reset", + "resetpassword", "reset-password", "root", "sales", - "schedule", "secure", "security", + "server", + "servers", "service", "services", "session", @@ -150,23 +159,38 @@ "system", "teams", "test", + "test1", + "test2", + "test3", + "test4", + "test5", + "test6", + "test7", + "test8", + "test9", "termsofservice", "terms-of-service", "tld", "token", - "token[1-9999]", "tokens", "tos", - "tos[1-99]", "txt", "url", "user", - "user[1-9999]", "users", "webmail", "webmaster", "whois", - "www[1-9]", + "ww", + "www1", + "www2", + "www3", + "www4", + "www5", + "www6", + "www7", + "www8", + "www9", "wwww", "your-domain-name" ]