[feladat @ 196]
authorrejo
Thu, 27 Mar 2008 16:39:29 +0000
changeset 96 35cd9e082b90
parent 95 737a213ad90c
child 97 090be08858db
[feladat @ 196] Another update to name field checking.
inc/dns.inc.php
--- a/inc/dns.inc.php	Thu Mar 27 16:30:51 2008 +0000
+++ b/inc/dns.inc.php	Thu Mar 27 16:39:29 2008 +0000
@@ -68,18 +68,19 @@
 		$wildcard = false;
 	}
 
-	if ($name == "" || $name == "@") {
-		$name = $domain;
-	} else {
-		$name = $name . "." . $domain ;
-	}
-
 	if (preg_match('!@\.!i', $name))
 	{
 		$name = str_replace('@.', '@', $name);
 	}
+	
+	if ($name == "" || $name == "@") {
+		$test_name = $domain;
+	} else {
+		$test_name = $name . "." . $domain ;
+	}
+
 	if(!$wildcard) {
-		if(!is_valid_hostname($name)) {
+		if(!is_valid_hostname($test_name)) {
 			error(ERR_DNS_HOSTNAME);
 			return false;
 		}