mirror of
https://github.com/Xahau/xahaud.git
synced 2026-06-03 08:46:36 +00:00
Tighten network ID check in handshake verification
This commit is contained in:
@@ -246,7 +246,7 @@ verifyHandshake(
|
||||
if (!beast::lexicalCastChecked(nid, std::string(iter->value())))
|
||||
throw std::runtime_error("Invalid peer network identifier");
|
||||
|
||||
if (networkID && nid != *networkID)
|
||||
if (!networkID && nid != 0 || networkID && nid != *networkID)
|
||||
throw std::runtime_error("Peer is on a different network");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user