diff --git a/src/chat/distributedchat.cc b/src/chat/distributedchat.cc index cacd68e08a..d9786eb27e 100644 --- a/src/chat/distributedchat.cc +++ b/src/chat/distributedchat.cc @@ -694,11 +694,13 @@ void DistributedChatService::handleRecvChatLobbyEventItem(RsChatLobbyEventItem * #endif rstime_t now = time(nullptr); + bool banned = false; if( rsReputations->overallReputationLevel(item->signature.keyId) == RsReputationLevel::LOCALLY_NEGATIVE ) { std::cerr << "(WW) Received lobby msg/item from banned identity " << item->signature.keyId << ". Dropping it." << std::endl; - return ; + //return ; // need to go all checks to keep pings passing to gui + banned = true; } if(!checkSignature(item,item->PeerId())) // check the object's signature and possibly request missing keys { @@ -744,11 +746,14 @@ void DistributedChatService::handleRecvChatLobbyEventItem(RsChatLobbyEventItem * std::cerr << std::endl; return ; } - // add a routing clue for this peer/GXSid combination. This is quite reliable since the lobby transport is almost instantaneous - rsGRouter->addRoutingClue(GRouterKeyId(item->signature.keyId),item->PeerId()) ; + if(!banned) + { + // add a routing clue for this peer/GXSid combination. This is quite reliable since the lobby transport is almost instantaneous + rsGRouter->addRoutingClue(GRouterKeyId(item->signature.keyId),item->PeerId()) ; - if(! bounceLobbyObject(item,item->PeerId())) + if(! bounceLobbyObject(item,item->PeerId())) return ; + } #ifdef DEBUG_CHAT_LOBBIES std::cerr << " doing specific job for this status item." << std::endl; @@ -819,7 +824,7 @@ void DistributedChatService::handleRecvChatLobbyEventItem(RsChatLobbyEventItem * #endif } } - + if(!banned || item->event_type == RS_CHAT_LOBBY_EVENT_KEEP_ALIVE) RsServer::notify()->notifyChatLobbyEvent(item->lobby_id,item->event_type,item->signature.keyId,item->string1); } diff --git a/src/services/p3gxsreputation.cc b/src/services/p3gxsreputation.cc index 4b7383a936..220414008f 100644 --- a/src/services/p3gxsreputation.cc +++ b/src/services/p3gxsreputation.cc @@ -129,7 +129,7 @@ static const uint32_t UPPER_LIMIT = 2; // used to static const int kMaximumSetSize = 100; // max set of updates to send at once. static const int CLEANUP_PERIOD = 600 ; // 10 minutes //static const int ACTIVE_FRIENDS_ONLINE_DELAY = 86400*7 ; // 1 week. -static const int kReputationRequestPeriod = 600; // 10 mins +static const int kReputationRequestPeriod = 63; // 10 mins static const int kReputationStoreWait = 180; // 3 minutes. //static const float REPUTATION_ASSESSMENT_THRESHOLD_X1 = 0.5f ; // reputation under which the peer gets killed. Warning there's a 1 shift with what's shown in GUI. Be careful. //static const uint32_t PGP_AUTO_BAN_THRESHOLD_DEFAULT = 2 ; // above this, auto ban any GXS id signed by this node