allow @ in filter

This commit is contained in:
Roland Gruber 2011-11-12 15:06:29 +00:00
parent 343ba86244
commit 30b6c95358
1 changed files with 2 additions and 2 deletions

View File

@ -212,12 +212,12 @@ class lamList {
$foundFilter = $_POST["filter" . strtolower($this->attrArray[$i])];
}
if (isset($foundFilter) && ($foundFilter != '')) {
if (preg_match('/^([\p{L}\p{N} _\\*\\$\\.-])+$/iu', $foundFilter)) { // \p{L} matches any Unicode letter
if (preg_match('/^([\p{L}\p{N} _\\*\\$\\.@-])+$/iu', $foundFilter)) { // \p{L} matches any Unicode letter
$filterParam .= "&filter" . $this->attrArray[$i] . '=' . $foundFilter;
$LDAPFilterPart .= '(' . $this->attrArray[$i] . '=' . $foundFilter . ')';
}
else {
StatusMessage('ERROR', _('Please enter a valid filter. Only letters, numbers and " _*$.-" are allowed.'), htmlspecialchars($foundFilter));
StatusMessage('ERROR', _('Please enter a valid filter. Only letters, numbers and " _*$.@-" are allowed.'), htmlspecialchars($foundFilter));
}
}
}