-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0, 1.3.0_01
-
None
-
ladybird
-
generic, sparc
-
generic, solaris_8
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2110068 | 1.4.0 | Jonathan Bruce | P4 | Resolved | Fixed | beta |
Overview:
---------
Obj.decodeReference cannot decode a JNDI Reference when the multi-valued attribute, javaReferenceAddress is returned unordered.
Details:
--------
A single-valued JNDI Reference is defined as:
javaReferenceAddress: #posn#StringRefAddr#addr# or #posn#BinaryRefAddr##addr
And a multi-valued Referernce stored as:
javaReferenceAddress: #0#type##Addr#, #1#type##Addr#, #2#type##Addr#
If, for instance the javaReferenceAddress attribute is retrieved and then returned in the following order ...
javaReferenceAddress: #2#type##Addr#, #1#type##Addr#, #0#type##Addr#
The LDAP provider then attempts to rebuild a Reference object. The 'posn' component of the first address is used as the index-position to insert the decoded address into the Vector of RefAddr addresses maintained in the Reference object.
The Vector object maintained in the Reference object is not given a specified size - it defaults to size 0. A RefAddr address added to the Vector with a index-position greater the size of the Vector will subsequently throw an ArrayIndexOutOfBoundsException.
A fix is required that allows for unordered (or any order) multiple values of javaReferernceAddress to be correctly decoded and to ensure that the resulting Reference object maintains the correct address order.
---------
Obj.decodeReference cannot decode a JNDI Reference when the multi-valued attribute, javaReferenceAddress is returned unordered.
Details:
--------
A single-valued JNDI Reference is defined as:
javaReferenceAddress: #posn#StringRefAddr#addr# or #posn#BinaryRefAddr##addr
And a multi-valued Referernce stored as:
javaReferenceAddress: #0#type##Addr#, #1#type##Addr#, #2#type##Addr#
If, for instance the javaReferenceAddress attribute is retrieved and then returned in the following order ...
javaReferenceAddress: #2#type##Addr#, #1#type##Addr#, #0#type##Addr#
The LDAP provider then attempts to rebuild a Reference object. The 'posn' component of the first address is used as the index-position to insert the decoded address into the Vector of RefAddr addresses maintained in the Reference object.
The Vector object maintained in the Reference object is not given a specified size - it defaults to size 0. A RefAddr address added to the Vector with a index-position greater the size of the Vector will subsequently throw an ArrayIndexOutOfBoundsException.
A fix is required that allows for unordered (or any order) multiple values of javaReferernceAddress to be correctly decoded and to ensure that the resulting Reference object maintains the correct address order.
- backported by
-
JDK-2110068 Obj.decodeReference does not correctly decode a multi-valued Reference
-
- Resolved
-
- duplicates
-
JDK-4458862 ArrayIndexOutOfBoundException thrown decoding a javax.naming.Reference
-
- Closed
-