FasterXML / FasterXML/jackson-dataformat-xml

Support for `StreamReadConstraints.maxDocumentLength`

Offen
#609 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
3.x processing-limits
Vorherrschende Sprache
Java
Sterne
631
Forks
246
Ø Merge
7 T. 9 Std.
Gemergte PRs (30 T.)
13

Beschreibung

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

First: some limits do work

* `maxTokenCount`

is enforced by XML parser itself, and

* `maxNumberLength`
* `maxStringLength`
* `maxNestingDepth`

are enforced by core `ParserMinimalBase`.

This leaves:

* `maxDocumentLength`

Woodstox has its own way to enforce limits 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](http://fasterxml.github.io/woodstox/javadoc/5.0/com/ctc/wstx/api/WstxInputProperties.html#P_MAX_ELEMENT_DEPTH).

`maxDocumentLength` could be enforced similarly - see [P_MAX_CHARACTERS](http://fasterxml.github.io/woodstox/javadoc/5.0/com/ctc/wstx/api/WstxInputProperties.html#P_MAX_CHARACTERS)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.