Skip to content

Commit

Permalink
dyndns: fix minor Duck DNS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Mar 14, 2015
1 parent 2da4270 commit 01d78e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/etc/inc/dyndns.class
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,15 @@
case 'custom':
if (!$dnsUpdateURL) $this->_error(7);
break;
case 'duckdns':
if (!$dnsUser) $this->_error(3);
if (!$dnsHost) $this->_error(5);
break;
default:
if (!$dnsUser) $this->_error(3);
if (!$dnsPass) $this->_error(4);
if (!$dnsHost) $this->_error(5);
break;
}

switch ($dnsService) {
Expand Down Expand Up @@ -684,7 +689,7 @@
log_error("Duck DNS ({$this->_dnsHost}): DNS update() starting.");
$server = "https://www.duckdns.org/update";
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;
default:
break;
Expand Down

0 comments on commit 01d78e2

Please sign in to comment.