Skip to content

Commit 28eadb7

Browse files
committed
Fixed: FS#1332 - Punycoded russian domain names in ISPConfig 3
1 parent 06b7fa9 commit 28eadb7

File tree

12 files changed

+13
-13
lines changed

12 files changed

+13
-13
lines changed

interface/lib/classes/tform.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ function validateField($field_name, $field_value, $validators) {
734734
}
735735
break;
736736
case 'ISEMAIL':
737-
if(!preg_match("/^\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z]{2,10}$/i", $field_value)) {
737+
if(!preg_match("/^\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}$/i", $field_value)) {
738738
$errmsg = $validator['errmsg'];
739739
if(isset($this->wordbook[$errmsg])) {
740740
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";

interface/web/dns/dns_wizard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@
138138
if(isset($_POST['ns2']) && $_POST['ns2'] == '') $error .= $app->lng('error_ns2_empty').'<br />';
139139
if(isset($_POST['email']) && $_POST['email'] == '') $error .= $app->lng('error_email_empty').'<br />';
140140

141-
if(isset($_POST['domain']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}[\.]{0,1}$/',$_POST['domain'])) $error .= $app->lng('error_domain_regex').'<br />';
141+
if(isset($_POST['domain']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z\-]{2,10}[\.]{0,1}$/',$_POST['domain'])) $error .= $app->lng('error_domain_regex').'<br />';
142142
if(isset($_POST['ns1']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}[\.]{0,1}$/',$_POST['ns1'])) $error .= $app->lng('error_ns1_regex').'<br />';
143143
if(isset($_POST['ns2']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}[\.]{0,1}$/',$_POST['ns2'])) $error .= $app->lng('error_ns2_regex').'<br />';
144-
if(isset($_POST['email']) && !preg_match('/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z]{2,10}$/i',$_POST['email'])) $error .= $app->lng('error_email_regex').'<br />';
144+
if(isset($_POST['email']) && !preg_match('/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z\-]{2,10}$/i',$_POST['email'])) $error .= $app->lng('error_email_regex').'<br />';
145145

146146
// make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
147147
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($_POST['client_group_id'])) {

interface/web/dns/form/dns_soa.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
1 => array ( 'type' => 'UNIQUE',
8383
'errmsg'=> 'origin_error_unique'),
8484
2 => array ( 'type' => 'REGEX',
85-
'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z]{2,10}[\.]{0,1}$/',
85+
'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z\-]{2,10}[\.]{0,1}$/',
8686
'errmsg'=> 'origin_error_regex'),
8787
),
8888
'default' => '',

interface/web/domain/form/domain.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
1 => array ( 'type' => 'UNIQUE',
9494
'errmsg'=> 'domain_error_unique'),
9595
2 => array ( 'type' => 'REGEX',
96-
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z]{2,10}$/',
96+
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
9797
'errmsg'=> 'domain_error_regex'),
9898
),
9999
'default' => '',

interface/web/mail/form/mail_aliasdomain.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
1 => array ( 'type' => 'UNIQUE',
7575
'errmsg'=> 'source_error_unique'),
7676
2 => array ( 'type' => 'REGEX',
77-
'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z]{2,10}$/',
77+
'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z\-]{2,10}$/',
7878
'errmsg'=> 'source_error_regex'),
7979
),
8080
'default' => '',

interface/web/mail/form/mail_domain.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
1 => array ( 'type' => 'UNIQUE',
7878
'errmsg'=> 'domain_error_unique'),
7979
2 => array ( 'type' => 'REGEX',
80-
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z]{2,10}$/',
80+
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
8181
'errmsg'=> 'domain_error_regex'),
8282
),
8383
'default' => '',

interface/web/mail/form/mail_domain_catchall.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
1 => array ( 'type' => 'UNIQUE',
7575
'errmsg'=> 'domain_error_unique'),
7676
2 => array ( 'type' => 'REGEX',
77-
'regex' => '/^\@[\w\.\-]{2,255}\.[a-zA-Z]{2,10}$/',
77+
'regex' => '/^\@[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
7878
'errmsg'=> 'domain_error_regex'),
7979
),
8080
'default' => '',

interface/web/mail/form/mail_get.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
8282
'errmsg'=> 'source_server_error_isempty'),
8383
1 => array ( 'type' => 'REGEX',
84-
'regex' => '/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}$/',
84+
'regex' => '/^[\w\.\-]{2,64}\.[a-zA-Z\-]{2,10}$/',
8585
'errmsg'=> 'source_server_error_regex'),
8686
),
8787
'default' => '',

interface/web/mail/form/mail_user.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
'datatype' => 'VARCHAR',
115115
'formtype' => 'TEXT',
116116
'validators' => array ( 0 => array ( 'type' => 'REGEX',
117-
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z]{2,10}){0,1}$/i',
117+
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}){0,1}$/i',
118118
'errmsg'=> 'cc_error_isemail'),
119119
),
120120
'default' => '',

interface/web/sites/form/web_aliasdomain.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
1 => array ( 'type' => 'UNIQUE',
7878
'errmsg'=> 'domain_error_unique'),
7979
2 => array ( 'type' => 'REGEX',
80-
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z]{2,10}$/',
80+
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
8181
'errmsg'=> 'domain_error_regex'),
8282
),
8383
'default' => '',

0 commit comments

Comments
 (0)