Commit 6135422b authored by Costin's avatar Costin

Fix issue when DNS zone import fails silently with OK message if $TTL is...

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).
parent 09e83be1
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment