aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-06-27 14:22:54 +0200
committerWladimir J. van der Laan <[email protected]>2017-06-27 16:29:11 +0200
commitac52492cd22782d7b09c78c198fb6fd8eb1da57c (patch)
treee02f1da9e4323a3dcf37b829dcf87656983a0d4d /src/httpserver.cpp
parentMerge #10612: The young person's guide to the test_framework (diff)
parentIndentation after 'Remove redundant calls to gArgs.IsArgSet()' (diff)
downloaddiscoin-ac52492cd22782d7b09c78c198fb6fd8eb1da57c.tar.xz
discoin-ac52492cd22782d7b09c78c198fb6fd8eb1da57c.zip
Merge #10118: Util: Remove redundant calls to argsGlobal.IsArgSet()
ed866ab Indentation after 'Remove redundant calls to gArgs.IsArgSet()' (Jorge Timón) 506b700 Util: Remove redundant calls to gArgs.IsArgSet() (Jorge Timón) Tree-SHA512: 4f97a0bf2a76c0f351a6343db62898cf057d745c848de00fa09465e870a120f28e0d836cafd6a047f4ec0da7ab671aebee43fa7410c9f0e66382edd1bb2009ba
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index 1557cf98f..8841a4e9e 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -196,18 +196,16 @@ static bool InitHTTPAllowList()
LookupHost("::1", localv6, false);
rpc_allow_subnets.push_back(CSubNet(localv4, 8)); // always allow IPv4 local subnet
rpc_allow_subnets.push_back(CSubNet(localv6)); // always allow IPv6 localhost
- if (gArgs.IsArgSet("-rpcallowip")) {
- for (const std::string& strAllow : gArgs.GetArgs("-rpcallowip")) {
- CSubNet subnet;
- LookupSubNet(strAllow.c_str(), subnet);
- if (!subnet.IsValid()) {
- uiInterface.ThreadSafeMessageBox(
- strprintf("Invalid -rpcallowip subnet specification: %s. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).", strAllow),
- "", CClientUIInterface::MSG_ERROR);
- return false;
- }
- rpc_allow_subnets.push_back(subnet);
+ for (const std::string& strAllow : gArgs.GetArgs("-rpcallowip")) {
+ CSubNet subnet;
+ LookupSubNet(strAllow.c_str(), subnet);
+ if (!subnet.IsValid()) {
+ uiInterface.ThreadSafeMessageBox(
+ strprintf("Invalid -rpcallowip subnet specification: %s. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).", strAllow),
+ "", CClientUIInterface::MSG_ERROR);
+ return false;
}
+ rpc_allow_subnets.push_back(subnet);
}
std::string strAllowed;
for (const CSubNet& subnet : rpc_allow_subnets)