mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-04 03:06:12 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
be9f3db8c6
commit
ac8ddc7e28
@@ -1939,6 +1939,7 @@ void MyMesh::handleCmdFrame(size_t len) {
|
|||||||
ContactInfo *recipient = lookupContactByPubKey(pub_key, PUB_KEY_SIZE);
|
ContactInfo *recipient = lookupContactByPubKey(pub_key, PUB_KEY_SIZE);
|
||||||
if (recipient && removeContact(*recipient)) {
|
if (recipient && removeContact(*recipient)) {
|
||||||
_store->deleteBlobByKey(pub_key, PUB_KEY_SIZE);
|
_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);
|
dirty_contacts_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY);
|
||||||
writeOKFrame();
|
writeOKFrame();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user