Skip to content

Commit

Permalink
Only accept a address from a peer if it is a valid IP address (hyperl…
Browse files Browse the repository at this point in the history
…edger#6439)

Signed-off-by: Matthew Whitehead <[email protected]>
  • Loading branch information
matthew1001 authored Jan 19, 2024
1 parent 925f494 commit 98718ae
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ protected void handleIncomingPacket(final Endpoint sourceEndpoint, final Packet
.getPacketData(PingPacketData.class)
.flatMap(PingPacketData::getFrom)
.map(Endpoint::getHost)
.filter(abc -> !abc.equals("127.0.0.1"))
.filter(
fromAddr ->
(!fromAddr.equals("127.0.0.1") && InetAddresses.isInetAddress(fromAddr)))
.stream()
.peek(
h ->
Expand Down

0 comments on commit 98718ae

Please sign in to comment.