From e490ec98fba66a89c9bcc30141174f9e89e08436 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 2 Jul 2005 12:03:49 +0000 Subject: [PATCH] added regex for DNs --- lam/lib/account.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 29f76281..8d818ea7 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -511,6 +511,9 @@ function get_preg($argument, $regexp) { case 'country': // Allow all letters and space $pregexpr = '/^[[:alpha:]]([[:alpha:] ])+$/u'; break; + case 'dn': // LDAP DN + $pregexpr = '/^([^=,]+=[^=,]+)(,([^=,]+=[^=,]+))*$/'; + break; } if ($pregexpr!='') if (preg_match($pregexpr, $argument)) {