fixed bug causing lobby messages signed by IDs linked to unknown PGP keys to be dropped

This commit is contained in:
csoler 2015-10-13 21:34:53 -04:00
parent 525310e5c6
commit 410102a7fc

View File

@ -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;