allow "#" in user names

This commit is contained in:
Roland Gruber 2013-11-08 18:14:06 +00:00
parent 75322829ae
commit 1581832879
1 changed files with 3 additions and 3 deletions

View File

@ -460,17 +460,17 @@ function get_preg($argument, $regexp) {
case 'groupname': // all letters, numbers, space and ._- are allowed characters
case 'username':
case 'hostname':
$pregexpr = '/^([[:alnum:]@\\.\\ \\_\\$-])+$/u';
$pregexpr = '/^([[:alnum:]#@\\.\\ \\_\\$-])+$/u';
break;
case 'krbUserName':
$pregexpr = '/^([[:alnum:]@\\/\\.\\ \\_\\$-])+$/u';
$pregexpr = '/^([[:alnum:]#@\\/\\.\\ \\_\\$-])+$/u';
break;
case 'hostObject':
$pregexpr = '/^[!]?([[:alnum:]@\\.\\ \\_\\$\\*-])+$/u';
break;
case 'usernameList': // comma separated list of user names
case 'groupnameList': // comma separated list of group names
$pregexpr = '/^([[:alnum:]@\\.\\ \\_-])+(,([[:alnum:]@\\.\\ \\_-])+)*$/u';
$pregexpr = '/^([[:alnum:]#@\\.\\ \\_-])+(,([[:alnum:]#@\\.\\ \\_-])+)*$/u';
break;
case 'realname': // Allow all but \, <, >, =, $, ?
case 'cn':