From 91bb612618f7f5c32c6c58ac4833f575e15a16db Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Sat, 15 Feb 2014 09:33:43 +0100 Subject: [PATCH] Fixed: FS#3336 - Underscore shouln't be possible in DNS entries! --- interface/web/dns/form/dns_a.tform.php | 2 +- interface/web/dns/form/dns_aaaa.tform.php | 2 +- interface/web/dns/form/dns_alias.tform.php | 4 ++-- interface/web/dns/form/dns_cname.tform.php | 4 ++-- interface/web/dns/form/dns_hinfo.tform.php | 2 +- interface/web/dns/form/dns_mx.tform.php | 4 ++-- interface/web/dns/form/dns_ns.tform.php | 4 ++-- interface/web/dns/form/dns_ptr.tform.php | 4 ++-- interface/web/dns/form/dns_rp.tform.php | 2 +- interface/web/dns/form/dns_slave.tform.php | 2 +- interface/web/dns/form/dns_soa.tform.php | 6 +++--- interface/web/dns/form/dns_srv.tform.php | 2 +- interface/web/dns/form/dns_txt.tform.php | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/interface/web/dns/form/dns_a.tform.php b/interface/web/dns/form/dns_a.tform.php index 7d4d276e8..b7def7d1e 100644 --- a/interface/web/dns/form/dns_a.tform.php +++ b/interface/web/dns/form/dns_a.tform.php @@ -86,7 +86,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\a-zA-Z0-9\.\-\*]{0,64}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,64}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_aaaa.tform.php b/interface/web/dns/form/dns_aaaa.tform.php index c03423b8b..0550aa426 100644 --- a/interface/web/dns/form/dns_aaaa.tform.php +++ b/interface/web/dns/form/dns_aaaa.tform.php @@ -79,7 +79,7 @@ $form["tabs"]['dns'] = array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-\*]{0,64}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,64}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_alias.tform.php b/interface/web/dns/form/dns_alias.tform.php index b97889bb3..3325814dc 100644 --- a/interface/web/dns/form/dns_alias.tform.php +++ b/interface/web/dns/form/dns_alias.tform.php @@ -88,7 +88,7 @@ $form["tabs"]['dns'] = array ( 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'name_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -117,7 +117,7 @@ $form["tabs"]['dns'] = array ( 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'data_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_cname.tform.php b/interface/web/dns/form/dns_cname.tform.php index b9d246c95..e2a86dea8 100644 --- a/interface/web/dns/form/dns_cname.tform.php +++ b/interface/web/dns/form/dns_cname.tform.php @@ -86,7 +86,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-\*]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -115,7 +115,7 @@ $form["tabs"]['dns'] = array ( 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'data_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_hinfo.tform.php b/interface/web/dns/form/dns_hinfo.tform.php index c64dea02d..6e815f5cd 100644 --- a/interface/web/dns/form/dns_hinfo.tform.php +++ b/interface/web/dns/form/dns_hinfo.tform.php @@ -88,7 +88,7 @@ $form["tabs"]['dns'] = array ( 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'name_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,64}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,64}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_mx.tform.php b/interface/web/dns/form/dns_mx.tform.php index 34268f9ef..6e0c7e323 100644 --- a/interface/web/dns/form/dns_mx.tform.php +++ b/interface/web/dns/form/dns_mx.tform.php @@ -87,7 +87,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-\*]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -116,7 +116,7 @@ $form["tabs"]['dns'] = array ( 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'data_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_ns.tform.php b/interface/web/dns/form/dns_ns.tform.php index 3eb39a927..502097773 100644 --- a/interface/web/dns/form/dns_ns.tform.php +++ b/interface/web/dns/form/dns_ns.tform.php @@ -86,7 +86,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -115,7 +115,7 @@ $form["tabs"]['dns'] = array ( 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'data_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_ptr.tform.php b/interface/web/dns/form/dns_ptr.tform.php index 3ba441b17..b74999288 100644 --- a/interface/web/dns/form/dns_ptr.tform.php +++ b/interface/web/dns/form/dns_ptr.tform.php @@ -86,7 +86,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,256}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,256}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -115,7 +115,7 @@ $form["tabs"]['dns'] = array ( 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,256}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,256}$/', 'errmsg'=> 'data_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_rp.tform.php b/interface/web/dns/form/dns_rp.tform.php index 86c43ed32..3b7808e71 100644 --- a/interface/web/dns/form/dns_rp.tform.php +++ b/interface/web/dns/form/dns_rp.tform.php @@ -86,7 +86,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_slave.tform.php b/interface/web/dns/form/dns_slave.tform.php index c5187317b..0e4eedd58 100644 --- a/interface/web/dns/form/dns_slave.tform.php +++ b/interface/web/dns/form/dns_slave.tform.php @@ -96,7 +96,7 @@ $form["tabs"]['dns_slave'] = array ( 'errmsg'=> 'origin_error_unique'), */ 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,10}[\.]{0,1}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,10}[\.]{0,1}$/', 'errmsg'=> 'origin_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php index fd41c87c9..e4237e08b 100644 --- a/interface/web/dns/form/dns_soa.tform.php +++ b/interface/web/dns/form/dns_soa.tform.php @@ -95,7 +95,7 @@ $form["tabs"]['dns_soa'] = array ( 1 => array ( 'type' => 'UNIQUE', 'errmsg'=> 'origin_error_unique'), 2 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,30}[\.]{0,1}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,30}[\.]{0,1}$/', 'errmsg'=> 'origin_error_regex'), ), 'default' => '', @@ -115,7 +115,7 @@ $form["tabs"]['dns_soa'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', 'errmsg'=> 'ns_error_regex'), ), 'default' => '', @@ -137,7 +137,7 @@ $form["tabs"]['dns_soa'] = array ( 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'mbox_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[[a-zA-Z0-9\.\-\_]{0,255}\.$/', + 'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}\.$/', 'errmsg'=> 'mbox_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_srv.tform.php b/interface/web/dns/form/dns_srv.tform.php index b737bbd97..368ecbf07 100644 --- a/interface/web/dns/form/dns_srv.tform.php +++ b/interface/web/dns/form/dns_srv.tform.php @@ -86,7 +86,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_txt.tform.php b/interface/web/dns/form/dns_txt.tform.php index 159629b20..7b13d92c7 100644 --- a/interface/web/dns/form/dns_txt.tform.php +++ b/interface/web/dns/form/dns_txt.tform.php @@ -86,7 +86,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', -- GitLab