Skip to content

Commit

Permalink
Fix #959: increase initial max-string-len default from 1M to 5M
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Mar 22, 2023
1 parent 0b1a48c commit 2a10eee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ JSON library.
faster `BigDecimal`, `BigInteger` parsing
(contributed by @pjfanning)
#863: Add `StreamReadConstraints` limit for longest textual value to
allow (default: 1M)
allow (default: 5M)
(contributed by @pjfanning)
#865: Optimize parsing 19 digit longs
(contributed by Phillipe M)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* <ul>
* <li>Maximum Number value length: default 1000 (see {@link #DEFAULT_MAX_NUM_LEN})
* </li>
* <li>Maximum String value length: default 1_000_000 (see {@link #DEFAULT_MAX_STRING_LEN})
* <li>Maximum String value length: default 5_000_000 (see {@link #DEFAULT_MAX_STRING_LEN})
* </li>
* <li>Maximum Nesting depth: default 1000 (see {@link #DEFAULT_MAX_DEPTH})
* </li>
Expand All @@ -40,7 +40,7 @@ public class StreamReadConstraints
/**
* Default setting for maximum string length: see {@link Builder#maxStringLength(int)} for details.
*/
public static final int DEFAULT_MAX_STRING_LEN = 1_000_000;
public static final int DEFAULT_MAX_STRING_LEN = 5_000_000;

protected final int _maxNestingDepth;
protected final int _maxNumLen;
Expand Down Expand Up @@ -94,7 +94,7 @@ public Builder maxNumberLength(final int maxNumLen) {

/**
* Sets the maximum string length (in chars or bytes, depending on input context).
* The default is 1,000,000. This limit is not exact, the limit is applied when we increase
* The default is 5,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.
Expand Down

0 comments on commit 2a10eee

Please sign in to comment.