mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUACAMOLE-893: Fix regression in LDAP causing null filter value to be sent.
This commit is contained in:
committed by
Nick Couchman
parent
981adc94e6
commit
10b3adcd83
@@ -142,16 +142,21 @@ public class ObjectQueryService {
|
|||||||
AndNode searchFilter = new AndNode();
|
AndNode searchFilter = new AndNode();
|
||||||
searchFilter.addNode(filter);
|
searchFilter.addNode(filter);
|
||||||
|
|
||||||
// Include all attributes within OR clause if there are more than one
|
// If no attributes provided, we're done.
|
||||||
|
if (attributes.size() < 1)
|
||||||
|
return searchFilter;
|
||||||
|
|
||||||
|
// Include all attributes within OR clause
|
||||||
OrNode attributeFilter = new OrNode();
|
OrNode attributeFilter = new OrNode();
|
||||||
|
|
||||||
// Add equality comparison for each possible attribute
|
// Add equality comparison for each possible attribute
|
||||||
attributes.forEach(attribute ->
|
attributes.forEach(attribute ->
|
||||||
attributeFilter.addNode(new EqualityNode(attribute, attributeValue))
|
attributeFilter.addNode(new EqualityNode(attribute,
|
||||||
|
(attributeValue != null ? attributeValue : "*")))
|
||||||
);
|
);
|
||||||
|
|
||||||
searchFilter.addNode(attributeFilter);
|
searchFilter.addNode(attributeFilter);
|
||||||
|
|
||||||
return searchFilter;
|
return searchFilter;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user