Skip to content

Commit 935d9cd

Browse files
committed
ensure entities in gTLD registrar domain responses include handle, roles and vcardArray properties.
1 parent 3af93e6 commit 935d9cd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/rdap-validator.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,6 +1912,18 @@ self.validateGTLDRegistrarDomain = function(domain, name) {
19121912

19131913
self.pushPath(".entities");
19141914

1915+
if (domain.hasOwnProperty("entities") && self.isArray(domain.entities)) {
1916+
self.iterate(
1917+
domain.entities,
1918+
function (e) {
1919+
["handle", "roles", "vcardArray"].forEach(p => self.add(
1920+
e.hasOwnProperty(p),
1921+
`Entity MUST have the '${p}' property.`,
1922+
));
1923+
}
1924+
);
1925+
}
1926+
19151927
const rant = (
19161928
domain.hasOwnProperty("entities") && self.isArray(domain.entities)
19171929
? domain.entities : []

0 commit comments

Comments
 (0)