From 0dc92501320b3dc23fbe26815463a4e1c92f9393 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 04 Apr 2016 10:02:04 +0000
Subject: [PATCH] OPENDJ-2813 Tolerate malformed attribute descriptions when filtering entries
---
opendj-server-legacy/src/main/java/org/opends/server/types/Entry.java | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/types/Entry.java b/opendj-server-legacy/src/main/java/org/opends/server/types/Entry.java
index b039fe8..3743370 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/types/Entry.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/types/Entry.java
@@ -4431,7 +4431,18 @@
continue;
}
- AttributeDescription attrDesc = AttributeDescription.valueOf(attrName);
+ final AttributeDescription attrDesc;
+ try
+ {
+ attrDesc = AttributeDescription.valueOf(attrName);
+ }
+ catch (LocalizedIllegalArgumentException e)
+ {
+ // For compatibility tolerate and ignore illegal attribute types, instead of
+ // aborting with a ProtocolError (2) as per the RFC. See OPENDJ-2813.
+ logger.traceException(e);
+ continue;
+ }
attrName = attrDesc.getNameOrOID();
final AttributeType attrType = attrDesc.getAttributeType();
if (attrType.isPlaceHolder())
--
Gitblit v1.10.0