userver
userver copied to clipboard
[json] parse depth limit
Parsing depth should be limited to some sane value, e.g. 128. Too big value may lead to a recursive call to rapidjson which might lead to stack overflow.
Internal ticket: 7801
This can be implemented without patching rapidjson itself. formats::json::FromString
can use a wrapper class/struct around impl::Value
with rapidjson visitation API that keeps track of the depth and forwards to impl::Value
's visitation API.
@segoon can you please assign this one to me?