The previously submitted patch (see mailing list archive) only checks
for proper records within a domain, attached is a patch that verifies
the domain name at domain-addition time.
Len
--
Len Padilla
[EMAIL PROTECTED]
*** vegadns-0.9.7.dist/src/domains.php 2004-10-16 00:21:59.000000000 +0200
--- vegadns-0.9.7/src/domains.php 2004-11-11 20:38:37.000000000 +0100
***************
*** 213,218 ****
--- 213,226 ----
$smarty->display('footer.tpl');
exit;
}
+ // make sure it's at least a correct domain name
+ if (!eregi("^[\.a-z0-9-]+$",$domain)) {
+ $smarty->assign('message', "<span class=\"error\">Error: domain
$domain does not appear to be a valid domain name</span>");
+ $smarty->display('header.tpl');
+ require('src/new_domain_form.php');
+ $smarty->display('footer.tpl');
+ exit;
+ }
$q = "select * from domains where
domain='".mysql_escape_string($domain)."'";
$result = mysql_query($q);