mirror of
https://github.com/meshtastic/firmware.git
synced 2026-10-02 11:15:35 -04:00
Licensed channel defaults, phone map growth, and payload read bounds (#11286)
* Strip the default PSK when licensed defaults are installed * Only record rate-limited portnums from the phone * Bound payload reads by the received size
This commit is contained in:
1 parent
df6e67f70b
commit
daf1213580
4 files changed
+23
-6
No files matched your search
@@ -1855,7 +1855,12 @@ bool PhoneAPI::handleToRadioPacket(meshtastic_MeshPacket &p)
|
||||
p.want_ack = true;
|
||||
}
|
||||
|
||||
lastPortNumToRadio[p.decoded.portnum] = millis();
|
||||
// Only the rate-limited ports above are ever read back, so recording any other portnum would let
|
||||
// a client grow this map without bound by cycling through them.
|
||||
if (IS_ONE_OF(p.decoded.portnum, meshtastic_PortNum_TRACEROUTE_APP, meshtastic_PortNum_POSITION_APP,
|
||||
meshtastic_PortNum_WAYPOINT_APP, meshtastic_PortNum_ALERT_APP, meshtastic_PortNum_TELEMETRY_APP,
|
||||
meshtastic_PortNum_TEXT_MESSAGE_APP))
|
||||
lastPortNumToRadio[p.decoded.portnum] = millis();
|
||||
service->handleToRadio(p);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user