diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index 7a8a21523a..1073e4ca13 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -20,6 +20,7 @@ JSON library. `ch.randelshofer:fastdoubleparser` (reported by Chris R) #1003: Add FastDoubleParser section to `NOTICE` +#1014: Increase default max allowed String value length from 5 megs to 20 megs 2.15.0 (23-Apr-2023) diff --git a/src/main/java/com/fasterxml/jackson/core/StreamReadConstraints.java b/src/main/java/com/fasterxml/jackson/core/StreamReadConstraints.java index cbb885263b..26756d072d 100644 --- a/src/main/java/com/fasterxml/jackson/core/StreamReadConstraints.java +++ b/src/main/java/com/fasterxml/jackson/core/StreamReadConstraints.java @@ -14,7 +14,7 @@ *
+ * NOTE: Jackson 2.15.0 initially used a lower setting (5_000_000). */ - public static final int DEFAULT_MAX_STRING_LEN = 5_000_000; + public static final int DEFAULT_MAX_STRING_LEN = 20_000_000; /** * Limit for the maximum magnitude of Scale of {@link java.math.BigDecimal} that can be @@ -98,13 +101,15 @@ public Builder maxNumberLength(final int maxNumLen) { /** * Sets the maximum string length (in chars or bytes, depending on input context). - * The default is 5,000,000. This limit is not exact, the limit is applied when we increase + * The default is 20,000,000. This limit is not exact, the limit is applied when we increase * internal buffer sizes and an exception will happen at sizes greater than this limit. Some * text values that are a little bigger than the limit may be treated as valid but no text * values with sizes less than or equal to this limit will be treated as invalid. *
* Setting this value to lower than the {@link #maxNumberLength(int)} is not recommended. *
+ *+ * NOTE: Jackson 2.15.0 initially used a lower setting (5_000_000). * * @param maxStringLen the maximum string length (in chars or bytes, depending on input context) *