aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorosensei <admin@monerohash.com>2016-05-16 08:34:15 -0300
committerosensei <admin@monerohash.com>2016-05-16 08:34:15 -0300
commit1c0bffb5f0c9b60a4314c22d6689e287227bd423 (patch)
treee8d6742b66cd208865cd4bd466edf3b2c24b99f7 /src
parentDon't allow 'flush_txpool' and 'setbans' JSON_RPC methods when running in res... (diff)
downloadmonero-1c0bffb5f0c9b60a4314c22d6689e287227bd423.tar.xz
Restrict also 'get_connections' and 'getbans' APIs.
Diffstat (limited to 'src')
-rw-r--r--src/rpc/core_rpc_server.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/core_rpc_server.h b/src/rpc/core_rpc_server.h
index c6579c0c2..a7a54b59f 100644
--- a/src/rpc/core_rpc_server.h
+++ b/src/rpc/core_rpc_server.h
@@ -104,11 +104,11 @@ namespace cryptonote
MAP_JON_RPC_WE("getblockheaderbyhash", on_get_block_header_by_hash, COMMAND_RPC_GET_BLOCK_HEADER_BY_HASH)
MAP_JON_RPC_WE("getblockheaderbyheight", on_get_block_header_by_height, COMMAND_RPC_GET_BLOCK_HEADER_BY_HEIGHT)
MAP_JON_RPC_WE("getblock", on_get_block, COMMAND_RPC_GET_BLOCK)
- MAP_JON_RPC_WE("get_connections", on_get_connections, COMMAND_RPC_GET_CONNECTIONS)
+ MAP_JON_RPC_WE_IF("get_connections", on_get_connections, COMMAND_RPC_GET_CONNECTIONS, !m_restricted)
MAP_JON_RPC_WE("get_info", on_get_info_json, COMMAND_RPC_GET_INFO)
MAP_JON_RPC_WE("hard_fork_info", on_hard_fork_info, COMMAND_RPC_HARD_FORK_INFO)
MAP_JON_RPC_WE_IF("setbans", on_set_bans, COMMAND_RPC_SETBANS, !m_restricted)
- MAP_JON_RPC_WE("getbans", on_get_bans, COMMAND_RPC_GETBANS)
+ MAP_JON_RPC_WE_IF("getbans", on_get_bans, COMMAND_RPC_GETBANS, !m_restricted)
MAP_JON_RPC_WE_IF("flush_txpool", on_flush_txpool, COMMAND_RPC_FLUSH_TRANSACTION_POOL, !m_restricted)
MAP_JON_RPC_WE("get_output_histogram", on_get_output_histogram, COMMAND_RPC_GET_OUTPUT_HISTOGRAM)
END_JSON_RPC_MAP()