diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 1a799b4d..17ea5192 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -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\\.\\_-])*\\$$/';