From efd42b729361d6d5e35126f9d4b820f65bc455d4 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 16 Nov 2023 10:27:09 +0100 Subject: [PATCH] ovh: fix nameserver matching there's a whole bunch: ovh.ca, ovh.us, ovh.com, ovhcloud.com, ovh.co.uk https://forum.cloudron.io/topic/10435/limitation-with-dns-using-ovh-in-validating-name-server-domains-domain-nameservers-are-not-set-to-ovh --- src/dns/ovh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dns/ovh.js b/src/dns/ovh.js index a448a7a14..6ff0337e9 100644 --- a/src/dns/ovh.js +++ b/src/dns/ovh.js @@ -216,7 +216,7 @@ async function verifyDomainConfig(domainObject) { if (error && error.code === 'ENOTFOUND') throw new BoxError(BoxError.BAD_FIELD, 'Unable to resolve nameservers for this domain'); if (error || !nameservers) throw new BoxError(BoxError.BAD_FIELD, error ? error.message : 'Unable to get nameservers'); - if (!nameservers.every(function (n) { return n.toLowerCase().indexOf('ovh.net') !== -1; })) { // SoYouStart and Kimsufi can also be accomdated + if (!nameservers.every(function (n) { return n.toLowerCase().search(/ovh|kimsufi/) !== -1; })) { // SoYouStart and Kimsufi can also be accomdated debug('verifyDomainConfig: %j does not contain OVH NS', nameservers); throw new BoxError(BoxError.BAD_FIELD, 'Domain nameservers are not set to OVH'); }