Commit 01d78e2a authored by Franco Fichtner's avatar Franco Fichtner

dyndns: fix minor Duck DNS issues

parent 2da4270d
...@@ -165,10 +165,15 @@ ...@@ -165,10 +165,15 @@
case 'custom': case 'custom':
if (!$dnsUpdateURL) $this->_error(7); if (!$dnsUpdateURL) $this->_error(7);
break; break;
case 'duckdns':
if (!$dnsUser) $this->_error(3);
if (!$dnsHost) $this->_error(5);
break;
default: default:
if (!$dnsUser) $this->_error(3); if (!$dnsUser) $this->_error(3);
if (!$dnsPass) $this->_error(4); if (!$dnsPass) $this->_error(4);
if (!$dnsHost) $this->_error(5); if (!$dnsHost) $this->_error(5);
break;
} }
switch ($dnsService) { switch ($dnsService) {
...@@ -684,7 +689,7 @@ ...@@ -684,7 +689,7 @@
log_error("Duck DNS ({$this->_dnsHost}): DNS update() starting."); log_error("Duck DNS ({$this->_dnsHost}): DNS update() starting.");
$server = "https://www.duckdns.org/update"; $server = "https://www.duckdns.org/update";
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, $server . '?domains=' . $this->_dnsHost . '&token=' . $this->_dnsUser); curl_setopt($ch, CURLOPT_URL, $server . '?domains=' . str_replace('.duckdns.org', '', $this->_dnsHost) . '&token=' . $this->_dnsUser);
break; break;
default: default:
break; break;
......
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