From fc368248316aebeb756bdd8b85d3f819eddc49d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Fri, 29 Jan 2021 22:33:07 +0100 Subject: Network: reply to any data request with secure channel --- src/network.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network.cpp b/src/network.cpp index 48ba4b9..9081b18 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -398,7 +398,8 @@ void Server::Priv::handlePacket(Server::Peer & peer, const TransportHeader & hea case TransportHeader::Type::DataRequest: { auto pref = std::get(item.value); - if (plaintextRefs.find(pref.digest()) != plaintextRefs.end()) { + if (holds_alternative>(peer.channel) || + plaintextRefs.find(pref.digest()) != plaintextRefs.end()) { if (auto ref = peer.tempStorage.ref(pref.digest())) { TransportHeader::Item hitem { TransportHeader::Type::DataResponse, *ref }; reply.header({ TransportHeader::Type::DataResponse, *ref }); -- cgit v1.2.3