diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2021-01-29 22:33:07 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2021-01-29 22:33:07 +0100 |
commit | fc368248316aebeb756bdd8b85d3f819eddc49d1 (patch) | |
tree | 25a3ff34cbdcf9d28c0673526f6452ca828b1a71 /src | |
parent | a16b33031c7bcf2eabf1e0c3571000234b7740df (diff) |
Network: reply to any data request with secure channel
Diffstat (limited to 'src')
-rw-r--r-- | src/network.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<PartialRef>(item.value); - if (plaintextRefs.find(pref.digest()) != plaintextRefs.end()) { + if (holds_alternative<Stored<Channel>>(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 }); |