FasterXML / FasterXML/jackson3-dev

Change "invalid subtype" (security check) from `BeanDeserializerFactory` into `ClassNameIdResolver`

未關閉
#20 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
沒有語言資料
星號
6
分支
0
PR 合併指標
30 天內沒有已合併 PR

描述

Jackson 2.x intercepts attempts at deserializing certain "serialization gadget" classes with `BeanDeserializerFactory`, when locating deserializer. While this works, it happens at a point during which `Class` itself has already been resolved (from class name to `Class` object).
I am not 100% sure if this does trigger static initialization blocks, but if it does, then there is a potential concern still in allowing that to proceed.
And regardless of this aspect it seems better to catch the problem earlier, at least to the degree this is possible (some checks do require checking of inheritance hierarchy).

So: it would make sense to handle at least some of "serialization gadget" checks within `ClassNameIdResolver`, even if more checks were needed at a later point.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。