fixed regex for user/group lists

This commit is contained in:
Roland Gruber 2004-09-27 19:09:48 +00:00
parent 7c49bb5aad
commit eb8297385c
1 changed files with 1 additions and 1 deletions

View File

@ -436,7 +436,7 @@ function get_preg($argument, $regexp) {
break;
case 'usernameList': // comma separated list of user names
case 'groupnameList': // comma separated list of group names
$pregexpr = '[[:alpha:]]([[:alnum:]\\.\\ \\_-])(,[[:alpha:]]([[:alnum:]\\.\\ \\_-]))*';
$pregexpr = '/^[[:alpha:]]([[:alnum:]\\.\\ \\_-])*(,[[:alpha:]]([[:alnum:]\\.\\ \\_-])*)*$/';
break;
case 'hostname': // first character must be letter, last must be $. Only normal letters, numbers and ._- are allowed
$pregexpr = '/^[a-zA-Z]([a-zA-Z0-9\\.\\_-])*\\$$/';