mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 00:49:28 -05:00
fixed bug causing lobby messages signed by IDs linked to unknown PGP keys to be dropped
This commit is contained in:
parent
525310e5c6
commit
410102a7fc
@ -169,7 +169,13 @@ bool DistributedChatService::handleRecvChatLobbyMsgItem(RsChatMsgItem *ci)
|
||||
{
|
||||
RsIdentityDetails details;
|
||||
|
||||
if(!rsIdentity->getIdDetails(cli->signature.keyId,details) || !details.mPgpKnown)
|
||||
if(!rsIdentity->getIdDetails(cli->signature.keyId,details))
|
||||
{
|
||||
std::cerr << "(WW) cannot get ID " << cli->signature.keyId << " for checking signature of lobby item." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!details.mPgpLinked)
|
||||
{
|
||||
std::cerr << "(WW) Received a lobby msg/item that is not PGP-authed (id=" << cli->signature.keyId << "), whereas the lobby flags require it. Rejecting!" << std::endl;
|
||||
|
||||
@ -672,7 +678,13 @@ void DistributedChatService::handleRecvChatLobbyEventItem(RsChatLobbyEventItem *
|
||||
{
|
||||
RsIdentityDetails details;
|
||||
|
||||
if(!rsIdentity->getIdDetails(item->signature.keyId,details) || !details.mPgpKnown)
|
||||
if(!rsIdentity->getIdDetails(item->signature.keyId,details))
|
||||
{
|
||||
std::cerr << "(WW) cannot get ID " << item->signature.keyId << " for checking signature of lobby item." << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
if(!details.mPgpLinked)
|
||||
{
|
||||
std::cerr << "(WW) Received a lobby msg/item that is not PGP-authed (ID=" << item->signature.keyId << "), whereas the lobby flags require it. Rejecting!" << std::endl;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user