FasterXML / FasterXML/jackson-dataformats-binary

(avro) Support `StreamReadConstraints.maxDocumentLength` and `maxTokenCount` in Avro parser

オープン
#785 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
347
フォーク
156
平均マージ
3日 3時間
マージ済み PR(30日)
22

説明

Two `StreamReadConstraints` settings are ignored by the Avro backend:

**`maxTokenCount`**: `AvroParserImpl.nextToken()` (and `nextNameMatch()`) assign `_currToken` directly instead of going through `ParserMinimalBase._updateToken()` / `_nullSafeUpdateToken()`, so tokens are never counted — `currentTokenCount()` stays 0 and the limit is never enforced. Only the `nextName()` variants count.

**`maxDocumentLength`**: no `validateDocumentLength()` calls anywhere — neither in `JacksonAvroParserImpl`'s buffer reloads, nor up front for `byte[]` input in `AvroFactory`, nor for the Apache-decoder path (`ApacheAvroParserImpl`), which reads from the `InputStream` directly.

CBOR and Smile support both (see #649, #651).

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。