Ignore invalid service envelopes (#4326)

custom-esp32^2
Ben Meadors 2024-07-24 08:23:04 -05:00 zatwierdzone przez GitHub
rodzic 300c3d32aa
commit 01e089fd07
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -135,6 +135,10 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length)
LOG_ERROR("Invalid MQTT service envelope, topic %s, len %u!\n", topic, length);
return;
} else {
if (e.channel_id == NULL || e.gateway_id == NULL) {
LOG_ERROR("Invalid MQTT service envelope, topic %s, len %u!\n", topic, length);
return;
}
meshtastic_Channel ch = channels.getByName(e.channel_id);
if (strcmp(e.gateway_id, owner.id) == 0) {
// Generate an implicit ACK towards ourselves (handled and processed only locally!) for this message.