Skip to content

Fail parsing from DataInput if StreamReadConstraints.getMaxDocumentLength() set [GHSA-2m67-wjpj-xhg9] #1570

Description

@cowtowncoder

Currently "maxDocumentLength" limit is not applied for DataInput backed parser (unlike streaming and non-blocking) because check cannot be implemented efficiently, due to input being read byte-by-byte, instead of in blocks (where checks can be applied only at boundary).

Since max-doc-length is "unset" (set as -1), i.e. not applied, user setting limit indicates expectation of limit.
We should explicitly fail parsing attempt in such case.

Note: addresses GHSA-2m67-wjpj-xhg9

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.2processing-limitsIssues related to limiting aspects of input/output that can be processed without exception

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions