Skip to content

Commit

Permalink
Fix behavior to disable check for manipulated hash calculations. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
joehni committed Dec 29, 2022
1 parent 28e4e20 commit 937e15f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xstream/src/java/com/thoughtworks/xstream/XStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ public void setMarshallingStrategy(final MarshallingStrategy marshallingStrategy
* Set time limit for adding elements to collections or maps.
*
* Manipulated content may be used to create recursive hash code calculations or sort operations. An
* {@link InputManipulationException} is thrown, it the summed up time to add elements to collections or maps
* {@link InputManipulationException} is thrown, if the summed up time to add elements to collections or maps
* exceeds the provided limit.
*
* Note, that the time to add an individual element is calculated in seconds, not milliseconds. However, attacks
Expand Down Expand Up @@ -1408,7 +1408,7 @@ public <T> T unmarshal(final HierarchicalStreamReader reader, final T root) {
*/
public <T> T unmarshal(final HierarchicalStreamReader reader, final T root, DataHolder dataHolder) {
try {
if (collectionUpdateLimit >= 0) {
if (collectionUpdateLimit > 0) {
if (dataHolder == null) {
dataHolder = new MapBackedDataHolder();
}
Expand Down Expand Up @@ -2105,7 +2105,7 @@ public ObjectInputStream createObjectInputStream(final HierarchicalStreamReader
*/
public ObjectInputStream createObjectInputStream(final HierarchicalStreamReader reader, DataHolder dataHolder)
throws IOException {
if (collectionUpdateLimit >= 0) {
if (collectionUpdateLimit > 0) {
if (dataHolder == null) {
dataHolder = new MapBackedDataHolder();
}
Expand Down

0 comments on commit 937e15f

Please sign in to comment.