From a6de542cdf1223fff62986e03f68811f0fd35208 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 28 Sep 2015 21:10:39 -0700 Subject: [PATCH] remove quotes from records --- cloudron.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudron.js b/cloudron.js index fb642f8..a675d67 100644 --- a/cloudron.js +++ b/cloudron.js @@ -272,7 +272,7 @@ Cloudron.prototype.checkDKIM = function (callback) { if (error) return callback(error); if (records.length !== 1 || records[0].length !== 1) return callback(new Error('Got ' + JSON.stringify(records) + ' TXT records. Expecting 1 length 2d array')); - if (records[0][0].search(/^"v=DKIM1; t=s; p=.*"$/) !== 0) return callback(new Error('Bad DKIM record. ' + records[0][0])); + if (records[0][0].search(/^v=DKIM1; t=s; p=.*$/) !== 0) return callback(new Error('Bad DKIM record. ' + records[0][0])); callback(); }); @@ -283,7 +283,7 @@ Cloudron.prototype.checkDMARC = function (callback) { if (error) return callback(error); if (records.length !== 1 || records[0].length !== 1) return callback(new Error('Got ' + JSON.stringify(records) + ' TXT records. Expecting 1 length 2d array')); - if (records[0][0].search(/^"v=DMARC1; p=none; pct=100; rua=mailto:.*; ruf=.*"$/) !== 0) return callback(new Error('Bad DMARC record. ' + records[0][0])); + if (records[0][0].search(/^v=DMARC1; p=none; pct=100; rua=mailto:.*; ruf=.*$/) !== 0) return callback(new Error('Bad DMARC record. ' + records[0][0])); callback(); });