network: require a session for keyed value requests

This commit is contained in:
Adrien Beraud committed 2026-10-29 23:28:48 -04:00
1 parent 35aa47029e
commit a06695734d
1 file changed
+2
+2
View File
@@ -902,6 +902,8 @@ NetworkEngine::process(std::unique_ptr<ParsedMessage>&& msg, const SockAddr& fro
break;
}
case MessageType::GetValues: {
if (transport_ and node->getTransport() and not msg->session)
throw DhtProtocolException {DhtProtocolException::UNAUTHORIZED, "Session required", msg->id};
// if (logger_)
// logger_->d("[node %s] got 'get' request for %s",
// node->toString().c_str(), msg->info_hash.toString().c_str());