mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04: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
1 changed files with 14 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue