mirror of
https://github.com/monero-project/monero.git
synced 2026-04-30 04:38:56 -07:00
wallet_rpc_server: add HTTP body size limit
Set m_max_content_length to MAX_RPC_CONTENT_LENGTH (1MB) to match the protection already implemented in core_rpc_server. This prevents memory exhaustion attacks via unlimited HTTP request sizes.
This commit is contained in:
@@ -398,6 +398,7 @@ namespace tools
|
||||
}
|
||||
|
||||
m_net_server.set_threads_prefix("RPC");
|
||||
m_net_server.get_config_object().m_max_content_length = MAX_RPC_CONTENT_LENGTH * 100;
|
||||
auto rng = [](size_t len, uint8_t *ptr) { return crypto::rand(len, ptr); };
|
||||
return epee::http_server_impl_base<wallet_rpc_server, connection_context>::init(
|
||||
rng, std::move(bind_port), std::move(rpc_config->bind_ip),
|
||||
|
||||
Reference in New Issue
Block a user