added regex for DNs
This commit is contained in:
parent
a46462e237
commit
e490ec98fb
|
@ -511,6 +511,9 @@ function get_preg($argument, $regexp) {
|
||||||
case 'country': // Allow all letters and space
|
case 'country': // Allow all letters and space
|
||||||
$pregexpr = '/^[[:alpha:]]([[:alpha:] ])+$/u';
|
$pregexpr = '/^[[:alpha:]]([[:alpha:] ])+$/u';
|
||||||
break;
|
break;
|
||||||
|
case 'dn': // LDAP DN
|
||||||
|
$pregexpr = '/^([^=,]+=[^=,]+)(,([^=,]+=[^=,]+))*$/';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if ($pregexpr!='')
|
if ($pregexpr!='')
|
||||||
if (preg_match($pregexpr, $argument)) {
|
if (preg_match($pregexpr, $argument)) {
|
||||||
|
|
Loading…
Reference in New Issue