mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 1ae46dce60 into merged_master (Bitcoin PR #17754)
This commit is contained in:
commit
c3f29355e6
13 changed files with 99 additions and 69 deletions
|
|
@ -173,7 +173,7 @@ static bool InitHTTPAllowList()
|
|||
rpc_allow_subnets.push_back(CSubNet(localv6)); // always allow IPv6 localhost
|
||||
for (const std::string& strAllow : gArgs.GetArgs("-rpcallowip")) {
|
||||
CSubNet subnet;
|
||||
LookupSubNet(strAllow.c_str(), subnet);
|
||||
LookupSubNet(strAllow, 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),
|
||||
|
|
@ -325,7 +325,7 @@ static bool HTTPBindAddresses(struct evhttp* http)
|
|||
evhttp_bound_socket *bind_handle = evhttp_bind_socket_with_handle(http, i->first.empty() ? nullptr : i->first.c_str(), i->second);
|
||||
if (bind_handle) {
|
||||
CNetAddr addr;
|
||||
if (i->first.empty() || (LookupHost(i->first.c_str(), addr, false) && addr.IsBindAny())) {
|
||||
if (i->first.empty() || (LookupHost(i->first, addr, false) && addr.IsBindAny())) {
|
||||
LogPrintf("WARNING: the RPC server is not safe to expose to untrusted networks such as the public internet\n");
|
||||
}
|
||||
boundSockets.push_back(bind_handle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue