jackson-dataformat-xml icon indicating copy to clipboard operation
jackson-dataformat-xml copied to clipboard

support for StreamReadConstraints

Open pjfanning opened this issue 2 years ago • 0 comments

https://github.com/FasterXML/jackson-core/blob/2.16/src/main/java/com/fasterxml/jackson/core/StreamReadConstraints.java

In particular, the 2 new ones (in 2.16)

  • maxDocumentLength
  • maxNameLength

With maxNestingDepth, Woodstox has its own way to enforce that and users who need to enforce that should use jackson-dataformat-xml with woodstox as the XML Stream Reader. See https://cowtowncoder.medium.com/configuring-woodstox-xml-parser-woodstox-specific-properties-1ce5030a5173 and the part about P_MAX_ELEMENT_DEPTH.

maxDocumentLength could be enforced similarly - see P_MAX_CHARACTERS

maxStringLength could be enforced using P_MAX_TEXT_LENGTH

pjfanning avatar Sep 11 '23 11:09 pjfanning