Skip to content

Commit 6135422

Browse files
committed
Fix issue when DNS zone import fails silently with OK message if $TTL is missing from the input file because TTL can not be null when saving SOA to database.
Solution: if TTL is null then simply set it to 1 day - 86400 seconds (as per RFC 1912 recommendations). I encountered few services that export a dns zone without global ttl set (ex: GoDaddy).
1 parent 09e83be commit 6135422

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/web/dns/dns_import.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@
611611
$retry = $soa['retry'];
612612
$expire = $soa['expire'];
613613
$minimum = $soa['minimum'];
614-
$ttl = $soa['ttl'];
614+
$ttl = isset($soa['ttl']) ? $soa['ttl'] : '86400';
615615
$xfer = '';
616616
$serial = $app->functions->intval($soa['serial']+1);
617617
//print_r($soa);

0 commit comments

Comments
 (0)