[feladat @ 268]
Added two missing exclamation marks in IP address verification function. Closes #52.
--- a/inc/dns.inc.php Tue May 13 20:59:32 2008 +0000
+++ b/inc/dns.inc.php Tue May 13 21:35:17 2008 +0000
@@ -151,7 +151,7 @@
// error(ERR_DNS_IPV4); return false;
// }
- if (preg_match("/^[0-9\.]{7,15}$/", $ipv4)) {
+ if (!preg_match("/^[0-9\.]{7,15}$/", $ipv4)) {
error(ERR_DNS_IPV4); return false;
}
@@ -181,7 +181,7 @@
// error(ERR_DNS_IPV6); return false;
// }
- if (preg_match("/^[0-9a-f]{0,4}:([0-9a-f]{0,4}:){0,6}[0-9a-f]{0,4}$/i", $ipv6)) {
+ if (!preg_match("/^[0-9a-f]{0,4}:([0-9a-f]{0,4}:){0,6}[0-9a-f]{0,4}$/i", $ipv6)) {
error(ERR_DNS_IPV6); return false;
}