Skip to content
Snippets Groups Projects
Commit 3ee67a99 authored by Till Brehm's avatar Till Brehm
Browse files

Added additional username check in form files.

parent 94b44c61
No related branches found
No related tags found
1 merge request!123Work for 3.0.5.4p4
......@@ -93,6 +93,13 @@ $form["tabs"]['shell'] = array (
1 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{0,32}$/',
'errmsg'=> 'username_error_regex'),
2 => array(
'type' => 'CUSTOM',
'class' => 'validate_systemuser',
'function' => 'check_sysuser',
'check_names' => true,
'errmsg' => 'invalid_username_txt'
),
),
'default' => '',
'value' => '',
......
......@@ -582,6 +582,13 @@ if($_SESSION["s"]["user"]["typ"] == 'admin') {
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'sysuser_error_empty'),
1 => array(
'type' => 'CUSTOM',
'class' => 'validate_systemuser',
'function' => 'check_sysuser',
'check_names' => true,
'errmsg' => 'invalid_system_user_or_group_txt'
),
),
'default' => '',
'value' => '',
......@@ -593,6 +600,13 @@ if($_SESSION["s"]["user"]["typ"] == 'admin') {
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'sysgroup_error_empty'),
1 => array(
'type' => 'CUSTOM',
'class' => 'validate_systemuser',
'function' => 'check_sysuser',
'check_names' => true,
'errmsg' => 'invalid_system_user_or_group_txt'
),
),
'default' => '',
'value' => '',
......
......@@ -31,4 +31,5 @@ $wb['username_not_allowed_txt'] = 'The username is not allowed.';
$wb['invalid_system_user_or_group_txt'] = 'Invalid system user or group';
$wb['directory_error_regex'] = 'Invalid directory';
$wb['shell_error_regex'] = 'Invalid shell';
$wb['invalid_username_txt'] = 'Invalid Username';
?>
......@@ -127,4 +127,5 @@ $wb['backup_excludes_txt'] = 'Excluded Directories';
$wb['backup_excludes_note_txt'] = '(Separate multiple directories with commas. Example: web/cache/*,web/backup)';
$wb['backup_excludes_error_regex'] = 'The excluded directories contain invalid characters.';
$wb['invalid_custom_php_ini_settings_txt'] = 'Invalid php.ini settings';
$wb['invalid_system_user_or_group_txt'] = 'Invalid system user or group';
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment