mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 04:55:52 +00:00
Let [rpc_admin_allow] take multiple lines.
This commit is contained in:
@@ -40,9 +40,13 @@ int iAdminGet(const Json::Value& jvRequest, const std::string& strRemoteIp)
|
||||
: true
|
||||
: false;
|
||||
// Meets IP restriction for admin.
|
||||
bool bAdminIP = theConfig.RPC_ADMIN_ALLOW.empty()
|
||||
? strRemoteIp == "127.0.0.1"
|
||||
: strRemoteIp == theConfig.RPC_ADMIN_ALLOW;
|
||||
bool bAdminIP = false;
|
||||
|
||||
BOOST_FOREACH(const std::string& strAllowIp, theConfig.RPC_ADMIN_ALLOW)
|
||||
{
|
||||
if (strAllowIp == strRemoteIp)
|
||||
bAdminIP = true;
|
||||
}
|
||||
|
||||
if (bPasswordWrong // Wrong
|
||||
|| (bPasswordSupplied && !bAdminIP)) // Supplied and doesn't meet IP filter.
|
||||
|
||||
Reference in New Issue
Block a user