This is a follow-up on:
created as new bug as SF.net tracker does not seem to allow new comments on closed bugs.
The fix that was applied to address that bug is here:
My questions are:
- Does it address the issue? The fix adds a randomized suffix to keys used to access NodeFactory.NODENAME_HASH HashMap. The suffix is constant during the life time of the NODENAME_HASH, all keys get the same suffix. However, String.hashCode() has a property that if key1.hashCode() equals key2.hashCode(), hash code of key1+suffix equals to key2+suffix for any suffix. Given that, this randomized suffix approach should not help avoiding collisions.
- Is it a real issue? NODENAME_HASH only seems to be written to in initNodeNameHash(). Additionally, initNodeNameHash() only seems to be called from a single place, where fixed (hard-coded in the source) String array is passed to it to populate NODENAME_HASH. Is there some other use I missed where inputs from (untrusted) XML gets stored to NODENAME_HASH?