diff options
author | osensei <admin@monerohash.com> | 2016-05-14 03:06:04 -0300 |
---|---|---|
committer | osensei <admin@monerohash.com> | 2016-05-14 03:06:04 -0300 |
commit | 9f8bc4946b3993ad4437936dcae705d2c8f1116a (patch) | |
tree | 0fbe7a39375b5b430a95232a0870ce2c6efa7eb2 /src/rpc | |
parent | Merge pull request #826 (diff) | |
download | monero-9f8bc4946b3993ad4437936dcae705d2c8f1116a.tar.xz |
Don't allow 'flush_txpool' and 'setbans' JSON_RPC methods when running in restricted mode.
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/core_rpc_server.h b/src/rpc/core_rpc_server.h index 4bed148fe..c6579c0c2 100644 --- a/src/rpc/core_rpc_server.h +++ b/src/rpc/core_rpc_server.h @@ -107,9 +107,9 @@ namespace cryptonote MAP_JON_RPC_WE("get_connections", on_get_connections, COMMAND_RPC_GET_CONNECTIONS) 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("setbans", on_set_bans, COMMAND_RPC_SETBANS) + 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("flush_txpool", on_flush_txpool, COMMAND_RPC_FLUSH_TRANSACTION_POOL) + 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() END_URI_MAP2() |