mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 12:22:50 -05:00
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.
This commit is contained in:
parent
e03409c70f
commit
6768389917
1 changed files with 1 additions and 1 deletions
|
@ -334,7 +334,7 @@ static bool InitRPCAuthentication()
|
|||
}
|
||||
}
|
||||
|
||||
g_rpc_whitelist_default = gArgs.GetBoolArg("-rpcwhitelistdefault", gArgs.IsArgSet("-rpcwhitelist"));
|
||||
g_rpc_whitelist_default = gArgs.GetBoolArg("-rpcwhitelistdefault", !gArgs.GetArgs("-rpcwhitelist").empty());
|
||||
for (const std::string& strRPCWhitelist : gArgs.GetArgs("-rpcwhitelist")) {
|
||||
auto pos = strRPCWhitelist.find(':');
|
||||
std::string strUser = strRPCWhitelist.substr(0, pos);
|
||||
|
|
Loading…
Add table
Reference in a new issue