mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 16:56:48 +00:00
refactor: Limit JSON array size (#7112)
This commit is contained in:
@@ -6,6 +6,13 @@
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
/** Maximum JSON object nesting depth permitted during parsing. */
|
||||
inline constexpr std::size_t kMAX_PARSED_JSON_DEPTH = 64;
|
||||
|
||||
/** Maximum number of elements permitted in any JSON array field during parsing.
|
||||
Requests exceeding this limit are rejected with an invalidParams error. */
|
||||
inline constexpr std::size_t kMAX_PARSED_JSON_ARRAY_SIZE = 512;
|
||||
|
||||
/** Holds the serialized result of parsing an input JSON object.
|
||||
This does validation and checking on the provided JSON.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user