diff --git a/dns/dyndns/Makefile b/dns/dyndns/Makefile index d0fd26bc6..cd5c706f4 100644 --- a/dns/dyndns/Makefile +++ b/dns/dyndns/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= dyndns -PLUGIN_VERSION= 1.13 +PLUGIN_VERSION= 1.14 PLUGIN_COMMENT= Dynamic DNS Support PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/dns/dyndns/src/www/services_dyndns_edit.php b/dns/dyndns/src/www/services_dyndns_edit.php index b1cc39111..4c10703d5 100644 --- a/dns/dyndns/src/www/services_dyndns_edit.php +++ b/dns/dyndns/src/www/services_dyndns_edit.php @@ -102,11 +102,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { do_input_validation($pconfig, $reqdfields, $reqdfieldsn, $input_errors); if (isset($pconfig['host']) && in_array('host', $reqdfields)) { - /* Namecheap can have a @. or *. in hostname */ - if ($pconfig['type'] == "namecheap" && (substr($pconfig['host'], 0, 2) == '@.' || substr($pconfig['host'], 0, 2) == '*.')) { - $host_to_check = substr($pconfig['host'], 2); - } else { - $host_to_check = $pconfig['host']; + $host_to_check = $pconfig['host']; + + switch ($pconfig['type']) { + case 'googledomains': + case 'namecheap': + $host_to_check = preg_replace('/^[@*]\./', '', $host_to_check); + break; + default: + break; } if (!is_domain($host_to_check)) {