diff options
author | Renato Botelho <renato@netgate.com> | 2016-02-04 13:35:32 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-02-04 13:35:32 -0200 |
commit | 380e42354bc604e44cb200348b2c223d8f848838 (patch) | |
tree | 6127a08eff1a5c0d2aa0244790d4bc0f4d9c53d0 /src | |
parent | e8f35ce462e8af23cb7d1af8ca59bee856a6e7bc (diff) | |
download | pfsense-380e42354bc604e44cb200348b2c223d8f848838.zip pfsense-380e42354bc604e44cb200348b2c223d8f848838.tar.gz |
Isolate the check for @label in the end of hostname only for noip and noip-free
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/services_dyndns_edit.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/usr/local/www/services_dyndns_edit.php b/src/usr/local/www/services_dyndns_edit.php index d76809f..9cdf20e 100644 --- a/src/usr/local/www/services_dyndns_edit.php +++ b/src/usr/local/www/services_dyndns_edit.php @@ -152,12 +152,15 @@ if ($_POST) { } 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); + /* No-ip can have a @ in hostname */ + if (substr($pconfig['type'], 0, 4) == "noip") { + $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); } - unset($last_to_check); } if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6") { |