From bef67b9d374d32a23e7f338f7b81f0cdd2eaa287 Mon Sep 17 00:00:00 2001 From: Edmondas Girkantas Date: Sat, 5 Apr 2014 11:25:59 +0300 Subject: [PATCH] Fixed issues described in #111. --- add_zone_slave.php | 2 +- inc/record.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/add_zone_slave.php b/add_zone_slave.php index aa3c6bbcc..5c7ba01fd 100644 --- a/add_zone_slave.php +++ b/add_zone_slave.php @@ -60,7 +60,7 @@ error(ERR_DNS_HOSTNAME); } elseif (domain_exists($zone)) { error(ERR_DOMAIN_EXISTS); - } elseif (!is_valid_ipv4($master) && !is_valid_ipv6($master)) { + } elseif (!is_valid_ipv4($master, false) && !is_valid_ipv6($master)) { error(ERR_DNS_IP); } else { if (add_domain($zone, $owner, $type, $master, 'none')) { diff --git a/inc/record.inc.php b/inc/record.inc.php index 500642b2b..36114d52c 100644 --- a/inc/record.inc.php +++ b/inc/record.inc.php @@ -1101,7 +1101,7 @@ function get_supermasters() { */ function supermaster_exists($master_ip) { global $db; - if (is_valid_ipv4($master_ip) || is_valid_ipv6($master_ip)) { + if (is_valid_ipv4($master_ip, false) || is_valid_ipv6($master_ip)) { $result = $db->queryOne("SELECT ip FROM supermasters WHERE ip = " . $db->quote($master_ip, 'text')); return ($result ? true : false); } else {