hostname no longer requires $ at the end
This commit is contained in:
parent
b8974a6872
commit
42f377dae0
|
@ -404,15 +404,13 @@ 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';
|
case 'hostname':
|
||||||
|
$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
|
|
||||||
$pregexpr = '/^[a-zA-Z]([a-zA-Z0-9\\.\\_-])*\\$$/u';
|
|
||||||
break;
|
|
||||||
case 'realname': // Allow all but \, <, >, =, $, ?
|
case 'realname': // Allow all but \, <, >, =, $, ?
|
||||||
case 'cn':
|
case 'cn':
|
||||||
$pregexpr = '/^[^\\\<>=\\$\\?]+(\\$)?$/';
|
$pregexpr = '/^[^\\\<>=\\$\\?]+(\\$)?$/';
|
||||||
|
|
Loading…
Reference in New Issue