This commit is contained in:
William Harrison
2025-03-06 20:52:29 +08:00
parent 2807153a71
commit 79d807cd01
2 changed files with 2 additions and 36 deletions
-22
View File
@@ -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`);
}
}
});
});
+2 -14
View File
@@ -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"
]