From 6135422baf0df91d05af2f9ec4be3f57b6267f07 Mon Sep 17 00:00:00 2001 From: Costin Date: Fri, 22 Dec 2017 23:17:38 +0100 Subject: [PATCH] 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). --- interface/web/dns/dns_import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index 6bb738ef1..814db71db 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -611,7 +611,7 @@ if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name' $retry = $soa['retry']; $expire = $soa['expire']; $minimum = $soa['minimum']; - $ttl = $soa['ttl']; + $ttl = isset($soa['ttl']) ? $soa['ttl'] : '86400'; $xfer = ''; $serial = $app->functions->intval($soa['serial']+1); //print_r($soa); -- GitLab