Skip to content

Commit 75aea3f

Browse files
committed
Avoid a NullPointerException in SearchEntryParer
Updated the logic that the LDAP SDK uses in the in-memory directory server and the ldifsearch tool to pare matching entries based on a set of requested attributes in the in-memory. If an entry included an attribute with an invalid name, then the logic used to parse an attribute description into the base attribute type name and a set of attribute options would result in a null pointer exception. It now uses more lenient logic for parsing attribute descriptions, and it can handle malformed attribute descriptions in a more graceful manner.
1 parent f485f6a commit 75aea3f

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

docs/release-notes.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ <h3>Version 6.0.11</h3>
2626
<br><br>
2727
</li>
2828

29+
<li>
30+
Updated the logic that the LDAP SDK uses in the in-memory directory server and
31+
the ldifsearch tool to pare matching entries based on a set of requested
32+
attributes in the in-memory. If an entry included an attribute with an invalid
33+
name, then the logic used to parse an attribute description into the base
34+
attribute type name and a set of attribute options would result in a null pointer
35+
exception. It now uses more lenient logic for parsing attribute descriptions,
36+
and it can handle malformed attribute descriptions in a more graceful manner.
37+
<br><br>
38+
</li>
39+
2940
<li>
3041
Updated the TimestampArgument class to allow it to accept timestamps in the ISO
3142
8601 format described in RFC 3339.

src/com/unboundid/ldap/listener/SearchEntryParer.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,12 @@ else if (s.startsWith("@"))
216216
*
217217
* @return An {@code ObjectPair} in which the first element is the attribute
218218
* type name and the second is the list of options (or an empty
219-
* list if there are no options). Alternately, a value of
220-
* {@code null} may be returned if the provided string does not
221-
* represent a valid attribute type description.
219+
* list if there are no options).
222220
*/
223221
@NotNull()
224222
private static ObjectPair<String,List<String>> getNameWithOptions(
225223
@NotNull final String s)
226224
{
227-
if (! Attribute.nameIsValid(s, true))
228-
{
229-
return null;
230-
}
231-
232225
final String l = StaticUtils.toLowerCase(s);
233226

234227
int semicolonPos = l.indexOf(';');

0 commit comments

Comments
 (0)