From ac8ddc7e28196a047f7ab15d091cad8e21a3a379 Mon Sep 17 00:00:00 2001 From: MarekZegare4 Date: Fri, 26 Jun 2026 10:59:35 +0200 Subject: [PATCH] fix(companion): forget saved room password when its contact is removed CMD_REMOVE_CONTACT already drops the contact's advert blob; also drop any saved /room_pw login for that key so a deleted room doesn't leave an orphaned (and now useless) password behind until FIFO eviction. Co-Authored-By: Claude Opus 4.8 --- examples/companion_radio/MyMesh.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/companion_radio/MyMesh.cpp b/examples/companion_radio/MyMesh.cpp index 066d124c..c36ade7c 100644 --- a/examples/companion_radio/MyMesh.cpp +++ b/examples/companion_radio/MyMesh.cpp @@ -1939,6 +1939,7 @@ void MyMesh::handleCmdFrame(size_t len) { ContactInfo *recipient = lookupContactByPubKey(pub_key, PUB_KEY_SIZE); if (recipient && removeContact(*recipient)) { _store->deleteBlobByKey(pub_key, PUB_KEY_SIZE); + forgetRoomPassword(pub_key); // drop any saved room login -- useless without the contact dirty_contacts_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY); writeOKFrame(); } else {