diff options
author | Renato Botelho <renato@netgate.com> | 2016-02-04 13:31:38 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-02-04 13:31:38 -0200 |
commit | e8f35ce462e8af23cb7d1af8ca59bee856a6e7bc (patch) | |
tree | b1f64a5d067822eb6aab735fc0017b5a93875544 | |
parent | ddacd37a829eeb705c2724a2ac0b50c208fae6bd (diff) | |
parent | 70a84c25760dca8a3db8b78ee273216c522cc0e7 (diff) | |
download | pfsense-e8f35ce462e8af23cb7d1af8ca59bee856a6e7bc.zip pfsense-e8f35ce462e8af23cb7d1af8ca59bee856a6e7bc.tar.gz |
Merge pull request #2574 from tiagobar/master
-rw-r--r-- | src/etc/inc/dyndns.class | 2 | ||||
-rw-r--r-- | src/usr/local/www/services_dyndns_edit.php | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class index daae470..17c6af3 100644 --- a/src/etc/inc/dyndns.class +++ b/src/etc/inc/dyndns.class @@ -405,7 +405,7 @@ } else { $iptoset = $this->_dnsIP; } - curl_setopt($ch, CURLOPT_URL, $server . $port . '?username=' . urlencode($this->_dnsUser) . '&pass=' . urlencode($this->_dnsPass) . '&hostname=' . $this->_dnsHost.'&ip=' . $iptoset); + curl_setopt($ch, CURLOPT_URL, $server . $port . '?username=' . urlencode($this->_dnsUser) . '&pass=' . urlencode($this->_dnsPass) . '&h[]=' . $this->_dnsHost.'&ip=' . $iptoset); break; case 'easydns': $needsIP = TRUE; diff --git a/src/usr/local/www/services_dyndns_edit.php b/src/usr/local/www/services_dyndns_edit.php index 8f69251..d76809f 100644 --- a/src/usr/local/www/services_dyndns_edit.php +++ b/src/usr/local/www/services_dyndns_edit.php @@ -151,6 +151,13 @@ if ($_POST) { $host_to_check = substr($_POST['host'], 2); } else { $host_to_check = $_POST['host']; + + /* No-ip (and maybe others) can have a @ in hostname */ + $last_to_check = strrpos($host_to_check, '@'); + if ($last_to_check !== false) { + $host_to_check = substr_replace($host_to_check, '.', $last_to_check, 1); + } + unset($last_to_check); } if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6") { |