From e1ceb050e19c7574bca146a8da7047ee4ff456b5 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Sun, 10 Jul 2016 05:02:35 -0400
Subject: [PATCH] Merge branch 'stable-3.1'
---
interface/web/sites/form/ftp_user.tform.php | 37 +++++++++++++++++++++++++++++++++++--
1 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/interface/web/sites/form/ftp_user.tform.php b/interface/web/sites/form/ftp_user.tform.php
index b540ec0..239bfdb 100644
--- a/interface/web/sites/form/ftp_user.tform.php
+++ b/interface/web/sites/form/ftp_user.tform.php
@@ -91,7 +91,7 @@
'validators' => array ( 0 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'username_error_unique'),
1 => array ( 'type' => 'REGEX',
- 'regex' => '/^[\w\.\-]{0,64}$/',
+ 'regex' => '/^[\w\.\-@\+]{0,64}$/',
'errmsg'=> 'username_error_regex'),
),
'default' => '',
@@ -110,6 +110,14 @@
),
'password' => array (
'datatype' => 'VARCHAR',
+ 'validators' => array(
+ 0 => array(
+ 'type' => 'CUSTOM',
+ 'class' => 'validate_password',
+ 'function' => 'password_check',
+ 'errmsg' => 'weak_password_txt'
+ )
+ ),
'formtype' => 'PASSWORD',
'encryption' => 'CRYPT',
'default' => '',
@@ -158,6 +166,13 @@
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'uid_error_empty'),
+ 1 => array(
+ 'type' => 'CUSTOM',
+ 'class' => 'validate_systemuser',
+ 'function' => 'check_sysuser',
+ 'check_names' => true,
+ 'errmsg' => 'invalid_system_user_or_group_txt'
+ ),
),
'default' => '0',
'value' => '',
@@ -169,6 +184,13 @@
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'gid_error_empty'),
+ 1 => array(
+ 'type' => 'CUSTOM',
+ 'class' => 'validate_systemuser',
+ 'function' => 'check_sysgroup',
+ 'check_names' => true,
+ 'errmsg' => 'invalid_system_user_or_group_txt'
+ ),
),
'default' => '0',
'value' => '',
@@ -179,7 +201,14 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'directory_error_empty'),
+ 'errmsg'=> 'directory_error_empty'),
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^\/[a-zA-Z0-9\ \.\-\_\/]{10,128}$/',
+ 'errmsg'=> 'directory_error_regex'),
+ 2 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_ftpuser',
+ 'function' => 'ftp_dir',
+ 'errmsg' => 'directory_error_notinweb'),
),
'default' => '',
'value' => '',
@@ -265,6 +294,10 @@
}
+$form['tabs']['advanced']['fields']['expires'] = array(
+ 'datatype' => 'DATETIME',
+ 'formtype' => 'DATETIME'
+);
?>
--
Gitblit v1.9.1