fixed regex for user/group lists
This commit is contained in:
parent
7c49bb5aad
commit
eb8297385c
|
@ -436,7 +436,7 @@ function get_preg($argument, $regexp) {
|
||||||
break;
|
break;
|
||||||
case 'usernameList': // comma separated list of user names
|
case 'usernameList': // comma separated list of user names
|
||||||
case 'groupnameList': // comma separated list of group names
|
case 'groupnameList': // comma separated list of group names
|
||||||
$pregexpr = '[[:alpha:]]([[:alnum:]\\.\\ \\_-])(,[[:alpha:]]([[:alnum:]\\.\\ \\_-]))*';
|
$pregexpr = '/^[[:alpha:]]([[:alnum:]\\.\\ \\_-])*(,[[:alpha:]]([[:alnum:]\\.\\ \\_-])*)*$/';
|
||||||
break;
|
break;
|
||||||
case 'hostname': // first character must be letter, last must be $. Only normal letters, numbers and ._- are allowed
|
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\\.\\_-])*\\$$/';
|
$pregexpr = '/^[a-zA-Z]([a-zA-Z0-9\\.\\_-])*\\$$/';
|
||||||
|
|
Loading…
Reference in New Issue