add braces to txt records when they contains '" "' (2 double qoutes with whitespace...
authorStricted <info@stricted.net>
Thu, 21 Jul 2016 11:43:09 +0000 (13:43 +0200)
committerStricted <info@stricted.net>
Thu, 21 Jul 2016 11:43:09 +0000 (13:43 +0200)
bind9.php

index f925eaf69950f020342bfcf2ce2d0d4cb354acb2..3133c6a2fe3d0984a592efef8dd29f0bf3434846 100644 (file)
--- 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";
                                }