From 380e42354bc604e44cb200348b2c223d8f848838 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 4 Feb 2016 13:35:32 -0200 Subject: Isolate the check for @label in the end of hostname only for noip and noip-free --- src/usr/local/www/services_dyndns_edit.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/usr') 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") { -- cgit v1.1