mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-11 03:13:35 +00:00
Merge pull request #50796 from is-a-dev/roman/gh-txt-record-test
tests: add test to disallow 'github-pages-challenge' in a TXT record
This commit is contained in:
2 files changed
+6
-4
No files matched your search
+1
-4
@@ -4,10 +4,7 @@
|
||||
"email": "triyatna.dev@gmail.com"
|
||||
},
|
||||
"records": {
|
||||
"CNAME": "triyatna.github.io",
|
||||
"TXT": [
|
||||
"_github-pages-challenge-triyatna.aingdb.is-a.dev=47d14fdcb43855b5bba588bdfdc363"
|
||||
]
|
||||
"CNAME": "triyatna.github.io"
|
||||
},
|
||||
"proxied": true
|
||||
}
|
||||
@@ -239,6 +239,11 @@ function validateRecordValues(t, data, file) {
|
||||
values.forEach((record, idx) => {
|
||||
t.true(typeof record === "string", `${file}: TXT record value should be a string at index ${idx}`);
|
||||
|
||||
t.false(
|
||||
record.includes("github-pages-challenge"),
|
||||
`${file}: TXT record cannot contain 'github-pages-challenge' at index ${idx}`
|
||||
);
|
||||
|
||||
if (record.startsWith("vc-domain-verify=")) {
|
||||
t.true(
|
||||
file.startsWith("_vercel."),
|
||||
|
||||
Reference in new issue
Block a user