Drop NodeInfo packets if the is_licensed bit doesn't match owner (#7361)

This commit is contained in:
Jonathan Bennett 2025-07-16 16:05:34 -05:00 committed by GitHub
parent 39716ed1ba
commit c3b2b474c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,6 +14,11 @@ bool NodeInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mes
{
auto p = *pptr;
if (p.is_licensed != owner.is_licensed) {
LOG_WARN("Invalid nodeInfo detected, is_licensed mismatch!");
return true;
}
// Coerce user.id to be derived from the node number
snprintf(p.id, sizeof(p.id), "!%08x", getFrom(&mp));