Skip to content

Commit

Permalink
Merge pull request #9660
Browse files Browse the repository at this point in the history
9311a24 validate ip parameter in set_bans rpc call (eversinc33)
  • Loading branch information
tobtoht committed Jan 14, 2025
2 parents 90e908f + 9311a24 commit 295dba0
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 295dba0

Please sign in to comment.