Auto merge of #1588 - bitcartel:upstream_8427_dos_logging, r=daira

Upstream: Prevent possible DoS in logging

bitcoin/bitcoin#8427
This commit is contained in:
zkbot 2016-10-22 13:08:26 -04:00
commit e3c8e88e9b
1 changed files with 6 additions and 2 deletions

View File

@ -5090,8 +5090,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
}
}
else
{
else if (strCommand == "notfound") {
// We do not care about the NOTFOUND message, but logging an Unknown Command
// message would be undesirable as we transmit it ourselves.
}
else {
// Ignore unknown commands for extensibility
LogPrint("net", "Unknown command \"%s\" from peer=%d\n", SanitizeString(strCommand), pfrom->id);
}