OPENDJ-2813 Tolerate malformed attribute descriptions when filtering entries
LDAP RFC 4511 specifies that a search operation's attribute list should
comprise of either "*", "+", or a valid attribute description. There is
also an extension which allows clients to specify object classes using
"@" prefixes.
Following the principle of being tolerant when receiving protocol, this
change relaxes the parsing of attribute descriptions such that invalid
attribute descriptions are simply ignored.
| | |
| | | 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()) |