Skip to content

Commit 793c77a

Browse files
author
Till Brehm
committed
Split DNS TXT records in chunks of 255 chars in BIND configuration file.
1 parent e960e1d commit 793c77a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/plugins-available/bind_plugin.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ function soa_update($event_name, $data) {
106106
if(is_array($records) && !empty($records)){
107107
for($i=0;$i<sizeof($records);$i++){
108108
if($records[$i]['ttl'] == 0) $records[$i]['ttl'] = '';
109+
//* Split TXT records, if nescessary
110+
if($records[$i]['type'] == 'TXT' && strlen($records[$i]['data']) > 255) {
111+
$records[$i]['data'] = implode('" "',str_split( $records[$i]['data'], 255));
112+
}
109113
}
110114
}
111115
$tpl->setLoop('zones', $records);

0 commit comments

Comments
 (0)