Skip to content

Commit

Permalink
validate ip parameter in set_bans rpc call
Browse files Browse the repository at this point in the history
  • Loading branch information
eversinc33 committed Dec 28, 2024
1 parent 941ecef commit 9311a24
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rpc/core_rpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2875,6 +2875,12 @@ namespace cryptonote
}
else
{
if (!i->ip)
{
error_resp.code = CORE_RPC_ERROR_CODE_WRONG_PARAM;
error_resp.message = "No ip/host supplied";
return false;
}
na = epee::net_utils::ipv4_network_address{i->ip, 0};
}
if (i->ban)
Expand Down

0 comments on commit 9311a24

Please sign in to comment.