mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-05 04:58:57 +00:00
Disable parsing of nested_flatbuffers as bytes by default
Parsing as bytes produces buffers that are unsafe to access unless passed thru a verifier, whereas users could reasonably assume that any JSON parsed without errors is safe to access. Users that still have legacy JSON files with such bytes in it will get a helpful error point them to the option to turn on to have it work again.
This commit is contained in:
@@ -595,6 +595,7 @@ struct IDLOptions {
|
||||
bool cs_global_alias;
|
||||
bool json_nested_flatbuffers;
|
||||
bool json_nested_flexbuffers;
|
||||
bool json_nested_legacy_flatbuffers;
|
||||
|
||||
// Possible options for the more general generator below.
|
||||
enum Language {
|
||||
@@ -684,6 +685,7 @@ struct IDLOptions {
|
||||
cs_global_alias(false),
|
||||
json_nested_flatbuffers(true),
|
||||
json_nested_flexbuffers(true),
|
||||
json_nested_legacy_flatbuffers(false),
|
||||
mini_reflect(IDLOptions::kNone),
|
||||
require_explicit_ids(false),
|
||||
lang_to_generate(0),
|
||||
|
||||
Reference in New Issue
Block a user