Skip to content

Commit 062368a

Browse files
committed
don't allow empty web_folder
1 parent 416c9fa commit 062368a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+57
-28
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,14 @@
367367
);
368368
$form['tabs']['domain']['fields']['web_folder'] = array (
369369
'datatype' => 'VARCHAR',
370-
'validators' => array ( 0 => array ( 'type' => 'REGEX',
371-
'regex' => '@^((?!(.*\.\.)|(.*\./)|(.*//))[^/][\w/_\.\-]{1,100})?$@',
372-
'errmsg'=> 'web_folder_error_regex'),
370+
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
371+
'errmsg'=> 'web_folder_error_empty'),
372+
1 => array ( 'type' => 'REGEX',
373+
'regex' => '@^((?!(.*\.\.)|(.*\./)|(.*//))[^/][\w/_\.\-]{1,100})?$@',
374+
'errmsg'=> 'web_folder_error_regex'),
373375
),
374-
'filters' => array( 0 => array( 'event' => 'SAVE',
375-
'type' => 'TRIM'),
376+
'filters' => array( 0 => array( 'event' => 'SAVE',
377+
'type' => 'TRIM'),
376378
),
377379
'formtype' => 'TEXT',
378380
'default' => '',

interface/web/sites/lib/lang/ar_web_vhost_domain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ $wb['repeat_password_txt'] = 'Repeat Password';
114114
$wb['password_mismatch_txt'] = 'The passwords do not match.';
115115
$wb['password_match_txt'] = 'The passwords do match.';
116116
$wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
117+
$wb['web_folder_error_empty'] = 'Web folder cannot be empty. Use /web/ to make the same as the Parent Website';
117118
$wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
118119
$wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
119120
$wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';

interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
2020
$wb['domain_txt'] = 'Domain';
2121
$wb['host_txt'] = 'Hostname';
2222
$wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
23+
$wb['web_folder_error_empty'] = 'Web folder cannot be empty. Use /web/ to make the same as the Parent Website';
2324
$wb['type_txt'] = 'Type';
2425
$wb['redirect_type_txt'] = 'Redirect Type';
2526
$wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
132133
$wb['https_port_txt'] = 'HTTPS Port';
133134
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
134135
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
135-
?>

interface/web/sites/lib/lang/bg_web_vhost_domain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ $wb['password_match_txt'] = 'The passwords do match.';
113113
$wb['ssl_key_txt'] = 'SSL Key';
114114
$wb['perl_txt'] = 'Perl';
115115
$wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
116+
$wb['web_folder_error_empty'] = 'Web folder cannot be empty. Use /web/ to make the same as the Parent Website';
116117
$wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
117118
$wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
118119
$wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';

interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
2020
$wb['domain_txt'] = 'Domain';
2121
$wb['host_txt'] = 'Hostname';
2222
$wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
23+
$wb['web_folder_error_empty'] = 'Web folder cannot be empty. Use /web/ to make the same as the Parent Website';
2324
$wb['type_txt'] = 'Type';
2425
$wb['redirect_type_txt'] = 'Redirect Type';
2526
$wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
132133
$wb['https_port_txt'] = 'HTTPS Port';
133134
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
134135
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
135-
?>

interface/web/sites/lib/lang/br_web_vhost_domain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $wb['ssl_domain_txt'] = 'Domínio SSL';
1515
$wb['server_id_txt'] = 'Servidor';
1616
$wb['domain_txt'] = 'Domínio';
1717
$wb['web_folder_error_regex'] = 'Pasta web é inválida. Por favor não utilize o caractere (barra).';
18+
$wb['web_folder_error_empty'] = 'Web folder cannot be empty. Use /web/ to make the same as the Parent Website';
1819
$wb['type_txt'] = 'Tipo';
1920
$wb['parent_domain_id_txt'] = 'Site Pai';
2021
$wb['redirect_type_txt'] = 'Tipo de redirecionamento';

interface/web/sites/lib/lang/br_web_vhost_subdomain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Servidor';
2020
$wb['domain_txt'] = 'Domínio';
2121
$wb['host_txt'] = 'Nome do host';
2222
$wb['web_folder_error_regex'] = 'Pasta Web é inválida. Por favor não utilize o caractere (barra).';
23+
$wb['web_folder_error_empty'] = 'Web folder cannot be empty. Use /web/ to make the same as the Parent Website';
2324
$wb['type_txt'] = 'Tipo';
2425
$wb['redirect_type_txt'] = 'Tipo de redirecionamento';
2526
$wb['r_redirect_txt'] = 'R (Temporary redirect)';

interface/web/sites/lib/lang/ca_web_vhost_domain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $wb['ssl_domain_txt'] = 'SSL Domain';
1515
$wb['server_id_txt'] = 'Server';
1616
$wb['domain_txt'] = 'Domain';
1717
$wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
18+
$wb['web_folder_error_empty'] = 'Web folder cannot be empty. Use /web/ to make the same as the Parent Website';
1819
$wb['type_txt'] = 'Type';
1920
$wb['parent_domain_id_txt'] = 'Parent Website';
2021
$wb['redirect_type_txt'] = 'Redirect Type';

interface/web/sites/lib/lang/ca_web_vhost_subdomain.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $wb['server_id_txt'] = 'Server';
2020
$wb['domain_txt'] = 'Domain';
2121
$wb['host_txt'] = 'Hostname';
2222
$wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
23+
$wb['web_folder_error_empty'] = 'Web folder cannot be empty. Use /web/ to make the same as the Parent Website';
2324
$wb['type_txt'] = 'Type';
2425
$wb['redirect_type_txt'] = 'Redirect Type';
2526
$wb['r_redirect_txt'] = 'R (Temporary redirect)';
@@ -132,4 +133,3 @@ $wb['http_port_txt'] = 'HTTP Port';
132133
$wb['https_port_txt'] = 'HTTPS Port';
133134
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
134135
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
135-
?>

interface/web/sites/lib/lang/cz_web_vhost_domain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $wb['domain_txt'] = 'Doména';
2020
$wb['type_txt'] = 'Verze';
2121
$wb['host_txt'] = 'Název hostitele';
2222
$wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
23+
$wb['web_folder_error_empty'] = 'Web folder cannot be empty. Use /web/ to make the same as the Parent Website';
2324
$wb['redirect_type_txt'] = 'Typ přesměrování';
2425
$wb['r_redirect_txt'] = 'R (Temporary redirect)';
2526
$wb['l_redirect_txt'] = 'L (Last redirect rule)';

0 commit comments

Comments
 (0)