fix(privacy): Stop logging AirPods encryption keys

This commit is contained in:
darken
2026-04-25 16:19:21 +02:00
committed by Matthias Urhahn
parent 486efe6e65
commit 5360f54ea8
2 changed files with 17 additions and 2 deletions
@@ -37,14 +37,14 @@ data class ProximityMessage(
log(
TAG,
Logging.Priority.ERROR
) { "Failed to decrypt $message with ${key.toByteString()}\n${e.asLog()}" }
) { "Failed to decrypt $message\n${e.asLog()}" }
null
}
log(
TAG,
Logging.Priority.VERBOSE
) { "Decrypted $message with ${key.toByteString()} to ${decryptedData?.toByteString()}" }
) { "Decrypted $message to ${decryptedData?.toByteString()}" }
if (decryptedData == null || decryptedData.size != 16) return null
@@ -55,4 +55,19 @@ data class AppleDeviceProfile(
showPopUpOnCaseOpen = showPopUpOnCaseOpen,
showPopUpOnConnection = showPopUpOnConnection,
)
override fun toString(): String = "AppleDeviceProfile(" +
"id=$id, label=$label, priority=$priority, model=$model, " +
"minimumSignalQuality=$minimumSignalQuality, " +
"identityKey=${if (identityKey == null) "null" else "<redacted>"}, " +
"encryptionKey=${if (encryptionKey == null) "null" else "<redacted>"}, " +
"address=$address, autoPause=$autoPause, autoPlay=$autoPlay, " +
"onePodMode=$onePodMode, autoConnect=$autoConnect, " +
"autoConnectCondition=$autoConnectCondition, " +
"showPopUpOnCaseOpen=$showPopUpOnCaseOpen, " +
"showPopUpOnConnection=$showPopUpOnConnection, " +
"learnedAllowOffEnabled=$learnedAllowOffEnabled, " +
"lastRequestedListeningModeCycleMask=$lastRequestedListeningModeCycleMask, " +
"stemActions=$stemActions" +
")"
}