From 0f6e48a80b6065b82b6f4f80eea81fd39ad2363b Mon Sep 17 00:00:00 2001 From: Stricted Date: Thu, 21 Jul 2016 13:43:09 +0200 Subject: [PATCH] add braces to txt records when they contains '" "' (2 double qoutes with whitespace between them [mostly in dkim records]) --- bind9.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bind9.php b/bind9.php index f925eaf..3133c6a 100644 --- a/bind9.php +++ b/bind9.php @@ -44,6 +44,10 @@ if (is_array($data) && !isset($data['error'])) { } } + if (strpos($txt, '" "') !== false && $txt != '" "') { + $record['data'] = '('.$record['data'].')'; // for dkim records + } + if (strpos($record['data'], "v=spf1") !== false) { $out .= $record['name']."\t".$record['ttl']."\tIN\tSPF\t" . $record['data']."\n"; } -- 2.20.1