LdapConnection: Properly render logical NOTs with only single expression

fixes #3818
This commit is contained in:
Johannes Meyer 2019-06-05 12:59:36 +02:00
parent 09090bcf9f
commit 40e27f8e2a
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ namespace Icinga\Protocol\Ldap;
use ArrayIterator;
use Exception;
use Icinga\Data\Filter\FilterNot;
use LogicException;
use stdClass;
use Icinga\Application\Config;
@ -1390,7 +1391,7 @@ class LdapConnection implements Selectable, Inspectable
}
$format = '%1$s(%2$s)';
if (count($parts) === 1) {
if (count($parts) === 1 && ! $filter instanceof FilterNot) {
$format = '%2$s';
}
if ($level === 0) {