show error if filter is invalid
This commit is contained in:
parent
277ba4c4a0
commit
37a9fd2831
|
@ -212,10 +212,15 @@ class lamList {
|
|||
if (isset($_POST["filter" . strtolower($this->attrArray[$i])])) {
|
||||
$foundFilter = $_POST["filter" . strtolower($this->attrArray[$i])];
|
||||
}
|
||||
if (isset($foundFilter) && preg_match('/^([\p{L}\p{N} _\\*\\$\\.-])+$/iu', $foundFilter)) { // \p{L} matches any Unicode letter
|
||||
if (isset($foundFilter) && ($foundFilter != '')) {
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->filterText = $filterParam;
|
||||
$this->filterPart = $LDAPFilterPart;
|
||||
|
|
Loading…
Reference in New Issue