FasterXML / FasterXML/jackson-dataformat-xml

Support for `StreamReadConstraints.maxDocumentLength`

Đang mở
#609 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
3.x processing-limits
Ngôn ngữ chính
Java
Star
631
Fork
246
Merge trung bình
7 ngày 9 giờ
Pull request đã merge (30 ngày)
13

Mô tả

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)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.