Skip to content

Commit

Permalink
fix(identity/ldap): adjust ldap error handling (camunda#4536)
Browse files Browse the repository at this point in the history
* thrown an error only if id is null, do nothing if an authorization is missing

camunda#4293
  • Loading branch information
yanavasileva authored Aug 15, 2024
1 parent 233c982 commit f1c8c60
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,20 +412,21 @@ protected <E extends DbEntity, T> List<T> retrieveResults(String baseDn,
E entity = transformEntity.apply(result);

String id = entity.getId();
if (id != null && resultCountPredicate.test(id)) {
if (resultCount >= firstResult || ignorePagination) {
if (LdapPluginLogger.INSTANCE.isDebugEnabled()) {
resultLogger.append(entity);
resultLogger.append(" based on ");
resultLogger.append(result);
resultLogger.append(", ");
if (id == null) {
LdapPluginLogger.INSTANCE.invalidLdapEntityReturned(entity, result);
} else {
if (resultCountPredicate.test(id)) {
if (resultCount >= firstResult || ignorePagination) {
if (LdapPluginLogger.INSTANCE.isDebugEnabled()) {
resultLogger.append(entity);
resultLogger.append(" based on ");
resultLogger.append(result);
resultLogger.append(", ");
}
entities.add((T) entity);
}
entities.add((T) entity);
resultCount++;
}
resultCount++;
} else {
LdapPluginLogger.INSTANCE.invalidLdapEntityReturned(entity, result);

}
}
}
Expand Down

0 comments on commit f1c8c60

Please sign in to comment.