Bound JSON-RPC input by size and nesting depth

Enforce the nesting bound in one parse, capping allocation by depth, not input size.
This commit is contained in:
xirvik
2026-09-19 02:11:20 +00:00
committed by Jari Sundell
parent 83b03c2c1e
commit 439d23ce62
5 changed files with 130 additions and 1 deletions
+4
View File
@@ -9,6 +9,8 @@ class TestJsonrpc : public test_fixture {
CPPUNIT_TEST(test_basics);
CPPUNIT_TEST(test_response_size_limit);
CPPUNIT_TEST(test_depth_limit);
CPPUNIT_TEST(test_size_limit);
CPPUNIT_TEST_SUITE_END();
@@ -18,6 +20,8 @@ public:
void test_basics();
void test_response_size_limit();
void test_depth_limit();
void test_size_limit();
private:
std::unique_ptr<TestMainThread> m_test_main_thread;