security: harden wallet, bootstrap, consensus, and RPC

(cherry picked from commit bed3d72099e04813393561a535b7dec9c0ac5e7f)
This commit is contained in:
Ethan Clay
2026-07-12 01:05:49 -04:00
parent 41e3898ff8
commit e6ae48d4d7
42 changed files with 1694 additions and 902 deletions
+9
View File
@@ -168,6 +168,15 @@ BOOST_AUTO_TEST_CASE(util_WildcardMatch)
BOOST_CHECK(WildcardMatch("abcdef", "a*f"));
BOOST_CHECK(!WildcardMatch("abcdef", "a*x"));
BOOST_CHECK(WildcardMatch("", "*"));
const std::string address = "192.0.2.44";
const std::string allow = "192.0.2.*";
BOOST_CHECK(WildcardMatch(std::string_view(address), std::string_view(allow)));
// A long non-match must not recurse once per wildcard/input combination.
const std::string longInput(4096, 'a');
const std::string longMask = "*a*a*a*a*a*a*a*a*a*a*b";
BOOST_CHECK(!WildcardMatch(std::string_view(longInput), std::string_view(longMask)));
}
BOOST_AUTO_TEST_CASE(util_FormatMoney)