Browse files

Issue #755 - creation of secondary mx entry at the dns template gives…

… error
  • Loading branch information...
1 parent fc485b7 commit 1b19d9ec2e010ec618f4bbef5c54682c853a7c03 mustafaramadhan committed Dec 2, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 kloxo/httpdocs/htmllib/lib/dns/dnstemplatelib.php
View
12 kloxo/httpdocs/htmllib/lib/dns/dnstemplatelib.php
@@ -79,6 +79,18 @@ function isSelect()
static function add($parent, $class, $param)
{
+ // issue #755 - creation of secondary mx entry at the dns template gives error
+ // only alphanumeric, dot and minus accepted --> like domain name
+
+// if (!preg_match("/^[^\W][0-9a-zA-Z-._]+[^\W]$/", $param['nname'])) {
+ if (!preg_match("/^[^\W][0-9a-zA-Z-.]+[^\W]$/", $param['nname'])) {
+ throw new lxexception('invalid_char_in_template_name', 'nname');
+ }
+
+ if (strlen($param['nname']) > 60) {
+ throw new lxException('template_name_over_char_limit', 'nname');
+ }
+
$param['nname'] = "{$param['nname']}.dnst";
$param['shared'] = 'on';
return $param;

0 comments on commit 1b19d9e

Please sign in to comment.