From 47bc8229b0a051c1a3186746d0d84e2efedcfc35 Mon Sep 17 00:00:00 2001 From: Stan Kladko <13399135+kladkogex@users.noreply.github.com> Date: Tue, 7 Nov 2023 13:05:15 +0000 Subject: [PATCH] #1702 Use start with --- libethereum/Precompiled.cpp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/libethereum/Precompiled.cpp b/libethereum/Precompiled.cpp index 257f60343d..4f59be395d 100644 --- a/libethereum/Precompiled.cpp +++ b/libethereum/Precompiled.cpp @@ -676,26 +676,7 @@ ETH_REGISTER_PRECOMPILED( logTextMessage )( bytesConstRef _in ) { } static const std::list< std::string > g_listReadableConfigParts{ "sealEngine", - //"genesis.*" - //"params.*", - - // skaled-1702 - // remove these config field from public access for security reasons - // "skaleConfig.nodeInfo.wallets.ima.commonBLSPublicKey*", - // "skaleConfig.nodeInfo.wallets.ima.BLSPublicKey*", - - // "skaleConfig.nodeInfo.nodeName", "skaleConfig.nodeInfo.nodeID", - // "skaleConfig.nodeInfo.basePort*", "skaleConfig.nodeInfo.*RpcPort*", - // "skaleConfig.nodeInfo.acceptors", "skaleConfig.nodeInfo.max-connections", - // "skaleConfig.nodeInfo.max-http-queues", "skaleConfig.nodeInfo.ws-mode", - - // "skaleConfig.contractSettings.*", - - // "skaleConfig.sChain.emptyBlockIntervalMs", - - // "skaleConfig.sChain.schainName", "skaleConfig.sChain.schainID", - - "skaleConfig.sChain.nodes.*" }; + "skaleConfig.sChain.nodes." }; static bool stat_is_accessible_json_path( const std::string& strPath ) { if ( strPath.empty() ) @@ -704,7 +685,7 @@ static bool stat_is_accessible_json_path( const std::string& strPath ) { itEnd = g_listReadableConfigParts.cend(); for ( ; itWalk != itEnd; ++itWalk ) { const std::string strWildCard = ( *itWalk ); - if ( skutils::tools::wildcmp( strWildCard.c_str(), strPath.c_str() ) ) + if (boost::algorithm::starts_with( strPath, strWildCard )) return true; } return false;