Skip to content

Commit

Permalink
Modifications to handle a long TXT record for bind (ex: dkim public key)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberal77 committed Nov 7, 2017
1 parent 7aaa5f6 commit 3c336c0
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions bind/include/application/inc_bind.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,17 +661,17 @@ function action_generate_zonefile( $domain_name, $domain_id )
$record["record_name"] .= "."; // append . as FQDN
}

// Adjust content if > 255 and record type is TXT
if ((strcmp($record["record_type"],"TXT")==0) && (strlen($record["record_content"]) > 257)) {
$content2split = substr($record["record_content"],1,-1);
$record["record_content"] = '"';
while (strlen($content2split) > 255) {
$record["record_content"] .= substr($content2split,0,255) .'""';
$content2split = substr($content2split,255);
}

$record["record_content"] .= $content2split.'"';
}
// Adjust content if > 255 and record type is TXT
if ((strcmp($record["record_type"],"TXT")==0) && (strlen($record["record_content"]) > 257)) {
$content2split = substr($record["record_content"],1,-1);
$record["record_content"] = '"';
while (strlen($content2split) > 255) {
$record["record_content"] .= substr($content2split,0,255) .'""';
$content2split = substr($content2split,255);
}

$record["record_content"] .= $content2split.'"';
}

break;

Expand Down

0 comments on commit 3c336c0

Please sign in to comment.