From fe9a23f542bc56c1c0b6dc30257418e38ff7bd3a Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Sat, 08 Jun 2013 18:57:40 -0400
Subject: [PATCH] - Fixed FS#2936 - Please check and limit username input length.

---
 interface/web/admin/form/system_config.tform.php |   72 +++++++++++++++++++++++++++++++++++-
 1 files changed, 70 insertions(+), 2 deletions(-)

diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index 0d776d9..7dbb140 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -154,6 +154,12 @@
 			'default'	=> 'n',
 			'value'		=> array(0 => 'n',1 => 'y')
 		),
+		'client_username_web_check_disabled' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'CHECKBOX',
+			'default'	=> 'n',
+			'value'		=> array(0 => 'n',1 => 'y')
+		),
 	##################################
 	# ENDE Datatable fields
 	##################################
@@ -184,7 +190,7 @@
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 0 => array (	'type'	=> 'REGEX',
-                                                                'regex' => '/^[0-9a-zA-Z\:\/\-\.]{0,255}$/',
+                                                                'regex' => '/^[0-9a-zA-Z\:\/\-\.]{0,255}(\?.+)?$/',
                                                                 'errmsg'=> 'webmail_url_error_regex'),
                                                 ),
 			'default'	=> '',
@@ -212,6 +218,13 @@
 		),
 		'admin_mail' => array (
 			'datatype'	=> 'VARCHAR',
+            'filters'   => array( 0 => array( 'event' => 'SAVE',
+                                              'type' => 'IDNTOASCII'),
+                                  1 => array( 'event' => 'SHOW',
+                                              'type' => 'IDNTOUTF8'),
+                                  2 => array( 'event' => 'SAVE',
+                                              'type' => 'TOLOWER')
+                                ),
 			'formtype'	=> 'TEXT',
 			'default'	=> '',
 			'value'		=> '',
@@ -234,6 +247,13 @@
 		),
 		'smtp_host' => array (
 			'datatype'	=> 'VARCHAR',
+            'filters'   => array( 0 => array( 'event' => 'SAVE',
+                                              'type' => 'IDNTOASCII'),
+                                  1 => array( 'event' => 'SHOW',
+                                              'type' => 'IDNTOUTF8'),
+                                  2 => array( 'event' => 'SAVE',
+                                              'type' => 'TOLOWER')
+                                ),
 			'formtype'	=> 'TEXT',
 			'default'	=> '',
 			'value'		=> '',
@@ -258,7 +278,7 @@
 		),
 		'smtp_pass' => array (
 			'datatype'	=> 'VARCHAR',
-			'formtype'	=> 'PASSWORD',
+			'formtype'	=> 'TEXT',
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
@@ -302,6 +322,30 @@
 	)
 );
 
+/* TODO_ BEGIN: Branding
+
+$form["tabs"]['domains'] = array (
+	'title' 	=> "Branding",
+	'width' 	=> 70,
+	'template' 	=> "templates/system_config_branding_edit.htm",
+	'fields' 	=> array (
+	##################################
+	# Begin Datatable fields
+	##################################
+                'allow_themechange' => array (
+                        'datatype'	=> 'VARCHAR',
+                        'formtype'	=> 'CHECKBOX',
+                        'default'	=> 'N',
+                        'value'         => array(0 => 'n',1 => 'y')
+                ),
+	##################################
+	# ENDE Datatable fields
+	##################################
+	)
+);
+
+
+ END: Branding */
 $form["tabs"]['misc'] = array (
 	'title' 	=> "Misc",
 	'width' 	=> 70,
@@ -334,6 +378,30 @@
 			'default'	=> '',
 			'value'		=> ''
 		),
+		'tab_change_discard' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'CHECKBOX',
+			'default'	=> 'n',
+			'value'		=> array(0 => 'n',1 => 'y')
+		),
+		'tab_change_warning' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'CHECKBOX',
+			'default'	=> 'n',
+			'value'		=> array(0 => 'n',1 => 'y')
+		),
+		'use_loadindicator' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'CHECKBOX',
+			'default'	=> 'y',
+			'value'		=> array(0 => 'n',1 => 'y')
+		),
+		'use_combobox' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'CHECKBOX',
+			'default'	=> 'y',
+			'value'		=> array(0 => 'n',1 => 'y')
+		),
 		'maintenance_mode' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'CHECKBOX',

--
Gitblit v1.9.1