From 7536c8e4a052bc889e434da3f6df8ae47faedd3d Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Mon, 25 Aug 2014 11:10:10 -0400
Subject: [PATCH] Updated security README.txt
---
interface/web/admin/form/server_config.tform.php | 580 +++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 373 insertions(+), 207 deletions(-)
diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index c83075f..01ac568 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -55,9 +55,9 @@
'width' => 70,
'template' => "templates/server_config_server_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'auto_network_configuration' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
@@ -86,6 +86,7 @@
'width' => '15',
'maxlength' => '255'
),
+ /*
'v6_prefix' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -94,6 +95,7 @@
),
'default' => ''
),
+ */
'gateway' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -117,15 +119,18 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => 'server1.domain.tld',
- 'filters' => array( 0 => array( 'event' => 'SAVE',
- 'type' => 'IDNTOASCII'),
- 1 => array( 'event' => 'SHOW',
- 'type' => 'IDNTOUTF8'),
- 2 => array( 'event' => 'SAVE',
- 'type' => 'TOLOWER')
- ),
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'hostname_error_empty'),
+ 'filters' => array( 0 => array( 'event' => 'SAVE',
+ 'type' => 'IDNTOASCII'),
+ 1 => array( 'event' => 'SHOW',
+ 'type' => 'IDNTOUTF8'),
+ 2 => array( 'event' => 'SAVE',
+ 'type' => 'TOLOWER')
+ ),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'hostname_error_empty'),
+ 1 => array ('type' => 'REGEX',
+ 'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/',
+ 'errmsg'=> 'hostname_error_regex'),
),
'value' => '',
'width' => '40',
@@ -162,12 +167,21 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '/var/backup',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'backup_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'backup_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'backup_dir_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
+ ),
+ 'backup_dir_is_mount' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(0 => 'n', 1 => 'y')
),
'backup_mode' => array(
'datatype' => 'VARCHAR',
@@ -181,10 +195,10 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
- 'errmsg'=> 'monit_url_error_regex'),
- ),
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
+ 'errmsg'=> 'monit_url_error_regex'),
+ ),
'value' => '',
'width' => '40',
'maxlength' => '255'
@@ -209,10 +223,10 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
- 'errmsg'=> 'munin_url_error_regex'),
- ),
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
+ 'errmsg'=> 'munin_url_error_regex'),
+ ),
'value' => '',
'width' => '40',
'maxlength' => '255'
@@ -233,9 +247,15 @@
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ 'monitor_system_updates' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'y',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -244,9 +264,9 @@
'width' => 60,
'template' => "templates/server_config_mail_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'module' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
@@ -257,8 +277,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '/home/vmail/[domain]/[localpart]/',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'maildir_path_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'maildir_path_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/\[\]]{5,128}$/',
+ 'errmsg'=> 'maildir_path_error_regex'),
),
'value' => '',
'width' => '40',
@@ -268,26 +291,16 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '/home/vmail/',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'homedir_path_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'homedir_path_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'homedir_path_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
),
- 'dkim_path' => array(
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '/var/db/dkim',
- 'validators' => array ( 0 => array ('type' => 'CUSTOM',
- 'class' => 'validate_dkim',
- 'function' => 'check_dkim_path',
- 'errmsg'=> 'dkim_path_error'),
- ),
- 'value' => '',
- 'width' => '40',
- 'maxlength' => '255'
- ),
'pop3_imap_daemon' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
@@ -304,8 +317,11 @@
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'default' => '5000',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'mailuser_uid_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'mailuser_uid_error_empty'),
+ 1 => array('type' => 'RANGE',
+ 'range' => '1999:',
+ 'errmsg' => 'mailuser_uid_error_range'),
),
'value' => '',
'width' => '10',
@@ -315,8 +331,11 @@
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'default' => '5000',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'mailuser_gid_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'mailuser_gid_error_empty'),
+ 1 => array('type' => 'RANGE',
+ 'range' => '1999:',
+ 'errmsg' => 'mailuser_gid_error_range'),
),
'value' => '',
'width' => '10',
@@ -326,8 +345,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => 'vmail',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'mailuser_name_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'mailuser_name_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^(?!ispconfig|root)([a-zA-Z0-9]{1,20})$/',
+ 'errmsg'=> 'mailuser_name_error_regex'),
),
'value' => '',
'width' => '10',
@@ -337,8 +359,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => 'vmail',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'mailuser_group_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'mailuser_group_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^(?!ispconfig|root)([a-zA-Z0-9]{1,20})$/',
+ 'errmsg'=> 'mailuser_group_name_error_regex'),
),
'value' => '',
'width' => '10',
@@ -388,16 +413,16 @@
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
- 'value' => array(0 => 'n',1 => 'y')
+ 'value' => array(0 => 'n', 1 => 'y')
),
'realtime_blackhole_list' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])(,\s*(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]))*)?$/',
- 'errmsg'=> 'rbl_error_regex'),
- ),
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])(,\s*(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]))*)?$/',
+ 'errmsg'=> 'rbl_error_regex'),
+ ),
'value' => '',
'width' => '40',
'maxlength' => '255'
@@ -419,8 +444,8 @@
'formtype' => 'TEXT',
'default' => '7',
'value' => '',
- 'width' => '20',
- 'maxlength' => '255'
+ 'width' => '20',
+ 'maxlength' => '255'
),
'overquota_notify_onok' => array(
'datatype' => 'VARCHAR',
@@ -428,9 +453,9 @@
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -439,23 +464,26 @@
'width' => 80,
'template' => "templates/server_config_getmail_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'getmail_config_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'getmail_config_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'getmail_config_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'getmail_config_dir_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -464,9 +492,9 @@
'width' => 60,
'template' => "templates/server_config_web_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'server_type' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
@@ -477,8 +505,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'website_basedir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'website_basedir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'website_basedir_error_regex'),
),
'value' => '',
'width' => '40',
@@ -488,8 +519,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'website_path_error_empty'),
+ 'validators' => array( 0 => array( 'type' => 'NOTEMPTY',
+ 'errmsg' => 'website_path_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/\[\]]{5,128}$/',
+ 'errmsg'=> 'website_path_error_regex'),
),
'value' => '',
'width' => '40',
@@ -499,8 +533,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'website_symlinks_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'website_symlinks_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/\[\]\:]{5,128}$/',
+ 'errmsg'=> 'website_symlinks_error_regex'),
),
'value' => '',
'width' => '40',
@@ -510,7 +547,7 @@
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
- 'value' => array(0 => 'n',1 => 'y')
+ 'value' => array(0 => 'n', 1 => 'y')
),
'website_autoalias' => array(
'datatype' => 'VARCHAR',
@@ -520,7 +557,7 @@
'width' => '40',
'maxlength' => '255'
),
-/*
+ /*
'vhost_rewrite_v6' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
@@ -532,8 +569,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'vhost_conf_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'vhost_conf_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'vhost_conf_dir_error_regex'),
),
'value' => '',
'width' => '40',
@@ -543,8 +583,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'vhost_conf_enabled_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'vhost_conf_enabled_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'vhost_conf_enabled_dir_error_regex'),
),
'value' => '',
'width' => '40',
@@ -554,8 +597,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'nginx_vhost_conf_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'nginx_vhost_conf_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'nginx_vhost_conf_dir_error_regex'),
),
'value' => '',
'width' => '40',
@@ -565,8 +611,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'nginx_vhost_conf_enabled_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'nginx_vhost_conf_enabled_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'nginx_vhost_conf_enabled_dir_error_regex'),
),
'value' => '',
'width' => '40',
@@ -575,6 +624,10 @@
'CA_path' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
+ 'validators' => array( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[a-zA-Z0-9\.\-\_\/]{0,128}$/',
+ 'errmsg'=> 'ca_path_error_regex'),
+ ),
'default' => '',
'value' => '',
'width' => '40',
@@ -659,8 +712,8 @@
'formtype' => 'TEXT',
'default' => '7',
'value' => '',
- 'width' => '20',
- 'maxlength' => '255'
+ 'width' => '20',
+ 'maxlength' => '255'
),
'overquota_notify_onok' => array(
'datatype' => 'VARCHAR',
@@ -674,6 +727,13 @@
'default' => '',
'validators' => array(0 => array('type' => 'NOTEMPTY',
'errmsg' => 'apache_user_error_empty'),
+ 1 => array(
+ 'type' => 'CUSTOM',
+ 'class' => 'validate_systemuser',
+ 'function' => 'check_sysuser',
+ 'check_names' => false,
+ 'errmsg' => 'invalid_apache_user_txt'
+ ),
),
'value' => '',
'width' => '40',
@@ -685,6 +745,13 @@
'default' => '',
'validators' => array(0 => array('type' => 'NOTEMPTY',
'errmsg' => 'apache_group_error_empty'),
+ 1 => array(
+ 'type' => 'CUSTOM',
+ 'class' => 'validate_systemuser',
+ 'function' => 'check_sysgroup',
+ 'check_names' => false,
+ 'errmsg' => 'invalid_apache_group_txt'
+ ),
),
'value' => '',
'width' => '40',
@@ -711,8 +778,15 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'nginx_user_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'nginx_user_error_empty'),
+ 1 => array(
+ 'type' => 'CUSTOM',
+ 'class' => 'validate_systemuser',
+ 'function' => 'check_sysuser',
+ 'check_names' => false,
+ 'errmsg' => 'invalid_nginx_user_txt'
+ ),
),
'value' => '',
'width' => '40',
@@ -722,8 +796,15 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'nginx_group_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'nginx_group_error_empty'),
+ 1 => array(
+ 'type' => 'CUSTOM',
+ 'class' => 'validate_systemuser',
+ 'function' => 'check_sysgroup',
+ 'check_names' => false,
+ 'errmsg' => 'invalid_nginx_group_txt'
+ ),
),
'value' => '',
'width' => '40',
@@ -733,8 +814,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'php_ini_path_apache_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'php_ini_path_apache_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'php_ini_path_apache_error_regex'),
),
'value' => '',
'width' => '40',
@@ -744,8 +828,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'php_ini_path_cgi_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'php_ini_path_cgi_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'php_ini_path_cgi_error_regex'),
),
'value' => '',
'width' => '40',
@@ -755,8 +842,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'php_fpm_init_script_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'php_fpm_init_script_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[a-zA-Z0-9\.\-\_]{1,128}$/',
+ 'errmsg'=> 'php_fpm_init_script_error_regex'),
),
'value' => '',
'width' => '40',
@@ -766,8 +856,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'php_fpm_ini_path_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'php_fpm_ini_path_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'php_fpm_ini_path_error_regex'),
),
'value' => '',
'width' => '40',
@@ -777,8 +870,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'php_fpm_pool_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'php_fpm_pool_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'php_fpm_pool_dir_error_regex'),
),
'value' => '',
'width' => '40',
@@ -788,7 +884,7 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
+ 'validators' => array(0 => array('type' => 'ISPOSITIVE',
'errmsg' => 'php_fpm_start_port_error_empty'),
),
'value' => '',
@@ -799,8 +895,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'php_fpm_socket_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'php_fpm_socket_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
+ 'errmsg'=> 'php_fpm_socket_dir_error_regex'),
),
'value' => '',
'width' => '40',
@@ -810,30 +909,25 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'php_open_basedir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'php_open_basedir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[a-zA-Z0-9\.\-\_\/\]\[\:]{1,}$/',
+ 'errmsg'=> 'php_open_basedir_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '4000'
),
- 'php_ini_check_minutes' => array(
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'default' => '1',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'php_ini_check_minutes_error_empty'),
- ),
- 'value' => '',
- 'width' => '10',
- 'maxlength' => '255'
- ),
'nginx_cgi_socket' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'nginx_cgi_socket_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'nginx_cgi_socket_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'nginx_cgi_socket_error_regex'),
),
'value' => '',
'width' => '40',
@@ -843,8 +937,8 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'htaccess_allow_override_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'htaccess_allow_override_error_empty'),
),
'value' => '',
'width' => '40',
@@ -891,6 +985,12 @@
'awstats_data_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'awstats_data_dir_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'awstats_data_dir_error_regex'),
+ ),
'default' => '',
'value' => '',
'width' => '40',
@@ -899,6 +999,12 @@
'awstats_pl' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'awstats_pl_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'awstats_pl_error_regex'),
+ ),
'default' => '',
'value' => '',
'width' => '40',
@@ -907,14 +1013,20 @@
'awstats_buildstaticpages_pl' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'awstats_buildstaticpages_pl_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'awstats_buildstaticpages_pl_error_regex'),
+ ),
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -923,15 +1035,18 @@
'width' => 60,
'template' => "templates/server_config_dns_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'bind_user' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'bind_user_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'bind_user_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^(?!ispconfig)([a-zA-Z0-9]{1,20})$/',
+ 'errmsg'=> 'invalid_bind_user_txt'),
),
'value' => '',
'width' => '40',
@@ -941,8 +1056,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'bind_group_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'bind_group_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^(?!ispconfig)([a-zA-Z0-9]{1,20})$/',
+ 'errmsg'=> 'invalid_bind_group_txt'),
),
'value' => '',
'width' => '40',
@@ -952,8 +1070,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'bind_zonefiles_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'bind_zonefiles_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'bind_zonefiles_dir_error_regex'),
),
'value' => '',
'width' => '40',
@@ -963,8 +1084,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'named_conf_path_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'named_conf_path_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'named_conf_path_error_regex'),
),
'value' => '',
'width' => '40',
@@ -974,16 +1098,19 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'named_conf_local_path_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'named_conf_local_path_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'named_conf_local_path_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -992,15 +1119,18 @@
'width' => 80,
'template' => "templates/server_config_fastcgi_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'fastcgi_starter_path' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'fastcgi_starter_path_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'fastcgi_starter_path_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/\[\]]{1,128}$/',
+ 'errmsg'=> 'fastcgi_starter_path_error_regex'),
),
'value' => '',
'width' => '40',
@@ -1010,8 +1140,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'fastcgi_starter_script_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'fastcgi_starter_script_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'fastcgi_starter_script_error_regex'),
),
'value' => '',
'width' => '40',
@@ -1021,8 +1154,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'fastcgi_alias_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'fastcgi_alias_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'fastcgi_alias_error_regex'),
),
'value' => '',
'width' => '40',
@@ -1032,8 +1168,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'fastcgi_phpini_path_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'fastcgi_phpini_path_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/\[\]]{1,128}$/',
+ 'errmsg'=> 'fastcgi_phpini_path_error_regex'),
),
'value' => '',
'width' => '40',
@@ -1043,7 +1182,7 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
+ 'validators' => array(0 => array('type' => 'ISPOSITIVE',
'errmsg' => 'fastcgi_children_error_empty'),
),
'value' => '',
@@ -1054,11 +1193,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array( 0 => array( 'type' => 'ISINT',
- 'errmsg' => 'fastcgi_max_requests_error_empty'),
- 1 => array( 'type' => 'RANGE',
- 'range' => '0:',
- 'errmsg' => 'fastcgi_max_requests_error_empty'),
+ 'validators' => array( 0 => array( 'type' => 'ISINT',
+ 'errmsg' => 'fastcgi_max_requests_error_empty'),
+ 1 => array( 'type' => 'RANGE',
+ 'range' => '0:',
+ 'errmsg' => 'fastcgi_max_requests_error_empty'),
),
'value' => '',
'width' => '40',
@@ -1068,8 +1207,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'fastcgi_bin_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'fastcgi_bin_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/\[\]]{1,128}$/',
+ 'errmsg'=> 'fastcgi_bin_error_regex'),
),
'value' => '',
'width' => '40',
@@ -1083,9 +1225,9 @@
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -1095,15 +1237,18 @@
'width' => 80,
'template' => "templates/server_config_jailkit_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'jailkit_chroot_home' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'jailkit_chroot_home_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'jailkit_chroot_home_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/\[\]]{1,128}$/',
+ 'errmsg'=> 'jailkit_chroot_home_error_regex'),
),
'value' => '',
'width' => '40',
@@ -1113,8 +1258,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'jailkit_chroot_app_sections_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'jailkit_chroot_app_sections_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[a-zA-Z0-9\-\_\ ]{1,128}$/',
+ 'errmsg'=> 'jailkit_chroot_app_sections_error_regex'),
),
'value' => '',
'width' => '40',
@@ -1124,8 +1272,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'jailkit_chroot_app_programs_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'jailkit_chroot_app_programs_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[a-zA-Z0-9\.\-\_\/\ ]{1,}$/',
+ 'errmsg'=> 'jailkit_chroot_app_programs_error_regex'),
),
'value' => '',
'width' => '40',
@@ -1135,16 +1286,19 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'jailkit_chroot_cron_programs_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'jailkit_chroot_cron_programs_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[a-zA-Z0-9\.\-\_\/\ ]{1,}$/',
+ 'errmsg'=> 'jailkit_chroot_cron_programs_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '1000'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -1217,23 +1371,26 @@
'width' => 80,
'template' => "templates/server_config_vlogger_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'config_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'vlogger_config_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'vlogger_config_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'vlogger_config_dir_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -1244,15 +1401,18 @@
'width' => 80,
'template' => "templates/server_config_cron_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'init_script' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'cron_init_script_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'cron_init_script_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[a-zA-Z0-9\-\_]{1,30}$/',
+ 'errmsg'=> 'cron_init_script_error_regex'),
),
'value' => '',
'width' => '40',
@@ -1262,8 +1422,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'crontab_dir_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'crontab_dir_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'crontab_dir_error_regex'),
),
'value' => '',
'width' => '40',
@@ -1273,16 +1436,19 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'cron_wget_error_empty'),
+ 'validators' => array( 0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'cron_wget_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{1,128}$/',
+ 'errmsg'=> 'cron_wget_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -1291,9 +1457,9 @@
'width' => 80,
'template' => "templates/server_config_rescue_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'try_rescue' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
@@ -1318,9 +1484,9 @@
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
?>
--
Gitblit v1.9.1