mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 12:54:57 -04:00
Don't allow 'flush_txpool' and 'setbans' JSON_RPC methods when running in restricted mode.
This commit is contained in:
parent
8b0d22a2aa
commit
9f8bc4946b
2 changed files with 6 additions and 4 deletions
|
@ -168,8 +168,8 @@
|
|||
response_info.m_header_info.m_content_type = " application/json"; \
|
||||
LOG_PRINT( query_info.m_URI << "[" << method_name << "] processed with " << ticks1-ticks << "/"<< ticks2-ticks1 << "/" << ticks3-ticks2 << "ms", LOG_LEVEL_2);
|
||||
|
||||
#define MAP_JON_RPC_WE(method_name, callback_f, command_type) \
|
||||
else if(callback_name == method_name) \
|
||||
#define MAP_JON_RPC_WE_IF(method_name, callback_f, command_type, cond) \
|
||||
else if((callback_name == method_name) && (cond)) \
|
||||
{ \
|
||||
PREPARE_OBJECTS_FROM_JSON(command_type) \
|
||||
epee::json_rpc::error_response fail_resp = AUTO_VAL_INIT(fail_resp); \
|
||||
|
@ -184,6 +184,8 @@
|
|||
return true;\
|
||||
}
|
||||
|
||||
#define MAP_JON_RPC_WE(method_name, callback_f, command_type) MAP_JON_RPC_WE_IF(method_name, callback_f, command_type, true)
|
||||
|
||||
#define MAP_JON_RPC_WERI(method_name, callback_f, command_type) \
|
||||
else if(callback_name == method_name) \
|
||||
{ \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue