kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix leakage of (slightly) possibly PII data
rodzic
b14061e6cc
commit
1eb4bf43d4
|
@ -280,7 +280,7 @@ class MeshService : Service(), Logging {
|
|||
*/
|
||||
private fun sendToRadio(p: ToRadio.Builder, requireConnected: Boolean = true) {
|
||||
val built = p.build()
|
||||
debug("Sending to radio $built")
|
||||
debug("Sending to radio ${built.toPIIString()}")
|
||||
val b = built.toByteArray()
|
||||
|
||||
if (SoftwareUpdateService.isUpdating)
|
||||
|
@ -777,7 +777,8 @@ class MeshService : Service(), Logging {
|
|||
// position updates from mesh usually don't include times. So promote rx time
|
||||
if (u.time == 0 && packet.rxTime != 0)
|
||||
u = u.toBuilder().setTime(packet.rxTime).build()
|
||||
debug("position_app ${packet.from} ${u.toOneLineString()}")
|
||||
// PII
|
||||
// debug("position_app ${packet.from} ${u.toOneLineString()}")
|
||||
handleReceivedPosition(packet.from, u, dataPacket.time)
|
||||
}
|
||||
|
||||
|
@ -895,7 +896,7 @@ class MeshService : Service(), Logging {
|
|||
debug("Ignoring nop position update for the local node")
|
||||
else
|
||||
updateNodeInfo(fromNum) {
|
||||
debug("update position: ${it.user?.longName} with ${p.toOneLineString()}")
|
||||
debug("update position: ${it.user?.longName?.toPIIString()} with ${p.toPIIString()}")
|
||||
it.position = Position(p, (defaultTime / 1000L).toInt())
|
||||
}
|
||||
}
|
||||
|
@ -924,8 +925,7 @@ class MeshService : Service(), Logging {
|
|||
val packet = toMeshPacket(p)
|
||||
p.status = MessageStatus.ENROUTE
|
||||
p.time = System.currentTimeMillis() // update time to the actual time we started sending
|
||||
if (BuildConfig.DEBUG)
|
||||
debug("Sending to radio: $packet") // IMPORTANT: we only log this info for debug builds, because it might leak PII
|
||||
// debug("Sending to radio: ${packet.toPIIString()}")
|
||||
sendToRadio(packet)
|
||||
}
|
||||
|
||||
|
@ -1003,7 +1003,8 @@ class MeshService : Service(), Logging {
|
|||
|
||||
private fun insertPacket(packetToSave: Packet) {
|
||||
serviceScope.handledLaunch {
|
||||
info("insert: ${packetToSave.message_type} = ${packetToSave.raw_message.toOneLineString()}")
|
||||
// Do not log, because might contain PII
|
||||
// info("insert: ${packetToSave.message_type} = ${packetToSave.raw_message.toOneLineString()}")
|
||||
packetRepo!!.insert(packetToSave)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,8 @@ class MeshServiceBroadcasts(
|
|||
if (p.id == 0) {
|
||||
MeshService.debug("Ignoring anonymous packet status")
|
||||
} else {
|
||||
MeshService.debug("Broadcasting message status $p")
|
||||
// Do not log, contains PII possibly
|
||||
// MeshService.debug("Broadcasting message status $p")
|
||||
val intent = Intent(MeshService.ACTION_MESSAGE_STATUS).apply {
|
||||
putExtra(EXTRA_PACKET_ID, p.id)
|
||||
putExtra(EXTRA_STATUS, p.status as Parcelable)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 16385ae6b102be20103fc310fd5e5ad5b178ea7a
|
||||
Subproject commit e6babd27a5c519ebe8d9673bc393ec80b2149060
|
Ładowanie…
Reference in New Issue