Skip to content

Commit 6768389

Browse files
committed
Fix nonsensical -norpcwhitelist behavior
Treat specifying -norpcwhitelist the same as not specifying -rpcwhitelist, instead of behaving almost the same but flipping the default -rpcwhitelistdefault value. This is confusing because before this change if -norpcwhitelist was specified it would block users from calling any RPC methods.
1 parent e03409c commit 6768389

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/httprpc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ static bool InitRPCAuthentication()
334334
}
335335
}
336336

337-
g_rpc_whitelist_default = gArgs.GetBoolArg("-rpcwhitelistdefault", gArgs.IsArgSet("-rpcwhitelist"));
337+
g_rpc_whitelist_default = gArgs.GetBoolArg("-rpcwhitelistdefault", !gArgs.GetArgs("-rpcwhitelist").empty());
338338
for (const std::string& strRPCWhitelist : gArgs.GetArgs("-rpcwhitelist")) {
339339
auto pos = strRPCWhitelist.find(':');
340340
std::string strUser = strRPCWhitelist.substr(0, pos);

0 commit comments

Comments
 (0)