Commit 6361e431 authored by tbrehm's avatar tbrehm

Improved: FS#2176 - collision between shell/ftp accounts and client accounts...

Improved: FS#2176 - collision between shell/ftp accounts and client accounts named webXX is not checked
parent 84569173
......@@ -77,7 +77,7 @@ class validate_client {
$app->uses('getconf');
$global_config = $app->getconf->get_global_config('sites');
if(substr($field_value,0,3) == 'web' &&
if((trim($field_value) == 'web' || preg_match('/^web[0-9]/',$field_value)) &&
($global_config['ftpuser_prefix'] == '[CLIENTNAME]' ||
$global_config['ftpuser_prefix'] == '' ||
$global_config['shelluser_prefix'] == '[CLIENTNAME]' ||
......
......@@ -109,5 +109,5 @@ $wb["limit_openvz_vm_template_id_txt"] = 'Force virtual server template';
$wb["limit_openvz_vm_error_notint"] = 'The virtual server limit must be a number.';
$wb["web_php_options_notempty"] = 'No PHP option(s) selected. Select at least one PHP option.';
$wb["ssh_chroot_notempty"] = 'No SSH chroot option selected. Select at least one SSH option.';
$wb["username_error_collision"] = 'The username may not start with the word - web -';
$wb["username_error_collision"] = 'The username may not start with the word -web- or -web- followed by a number';
?>
......@@ -108,5 +108,5 @@ $wb["limit_openvz_vm_template_id_txt"] = 'Force virtual server template';
$wb["limit_openvz_vm_error_notint"] = 'The virtual server limit must be a number.';
$wb["web_php_options_notempty"] = 'No PHP option(s) selected. Select at least one PHP option.';
$wb["ssh_chroot_notempty"] = 'No SSH chroot option selected. Select at least one SSH option.';
$wb["username_error_collision"] = 'The username may not start with the word - web -';
$wb["username_error_collision"] = 'The username may not start with the word -web- or -web- followed by a number';
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment