From 386566fd4bfa5a4f1c3fdb8ca3db25c3b778a383 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sat, 2 May 2020 18:06:21 -0700 Subject: [PATCH] Fcf: ix crash when no email provide with global key --- src/dns/cloudflare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dns/cloudflare.js b/src/dns/cloudflare.js index ac5740420..94bf00d42 100644 --- a/src/dns/cloudflare.js +++ b/src/dns/cloudflare.js @@ -289,7 +289,7 @@ function verifyDnsConfig(domainObject, callback) { if (dnsConfig.tokenType !== 'GlobalApiKey' && dnsConfig.tokenType !== 'ApiToken') return callback(new BoxError(BoxError.BAD_FIELD, 'tokenType is required', { field: 'tokenType' })); if (dnsConfig.tokenType === 'GlobalApiKey') { - if ('email' in dnsConfig && typeof dnsConfig.email !== 'string') return callback(new BoxError(BoxError.BAD_FIELD, 'email must be a non-empty string', { field: 'email' })); + if (typeof dnsConfig.email !== 'string') return callback(new BoxError(BoxError.BAD_FIELD, 'email must be a non-empty string', { field: 'email' })); } const ip = '127.0.0.1';