allow @ in user names
This commit is contained in:
parent
8b8a5c8195
commit
cc7c8f8b82
|
@ -396,11 +396,11 @@ function get_preg($argument, $regexp) {
|
||||||
break;
|
break;
|
||||||
case 'groupname': // first character must be a letter. All letters, numbers, space and ._- are allowed characters
|
case 'groupname': // first character must be a letter. All letters, numbers, space and ._- are allowed characters
|
||||||
case 'username': // first character must be a letter. All letters, numbers, space and ._- are allowed characters
|
case 'username': // first character must be a letter. All letters, numbers, space and ._- are allowed characters
|
||||||
$pregexpr = '/^[[:alpha:]]([[:alnum:]\\.\\ \\_-])*$/u';
|
$pregexpr = '/^[[:alpha:]]([[:alnum:]@\\.\\ \\_-])*$/u';
|
||||||
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:]\\.\\ \\_-])*)*$/u';
|
$pregexpr = '/^[[:alpha:]]([[:alnum:]@\\.\\ \\_-])*(,[[:alpha:]]([[:alnum:]@\\.\\ \\_-])*)*$/u';
|
||||||
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\\.\\_-])*\\$$/u';
|
$pregexpr = '/^[a-zA-Z]([a-zA-Z0-9\\.\\_-])*\\$$/u';
|
||||||
|
@ -427,7 +427,7 @@ function get_preg($argument, $regexp) {
|
||||||
$pregexpr = '/^[^\\\<>=\\$\\?]*$/';
|
$pregexpr = '/^[^\\\<>=\\$\\?]*$/';
|
||||||
break;
|
break;
|
||||||
case "homeDirectory": // Homapath, /path/......
|
case "homeDirectory": // Homapath, /path/......
|
||||||
$pregexpr = '/^([\/]([[:alnum:]\\$\\.\\ \\_-])+)+(\/)?$/u';
|
$pregexpr = '/^([\/]([[:alnum:]@\\$\\.\\ \\_-])+)+(\/)?$/u';
|
||||||
break;
|
break;
|
||||||
case "digit": // Normal number
|
case "digit": // Normal number
|
||||||
$pregexpr = '/^[[:digit:]]*$/';
|
$pregexpr = '/^[[:digit:]]*$/';
|
||||||
|
|
Loading…
Reference in New Issue