Repeater, room server, sensor: guests no longer cause a flash write per request

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-18 12:57:53 +01:00
1 parent 84f6fa03b2
commit de92ca9ba2
5 files changed
+26 -13

No files matched your search

+1 -2
View File
@@ -379,13 +379,12 @@ uint8_t MyMesh::handleLoginReq(const mesh::Identity& sender, const uint8_t* secr
MESH_DEBUG_PRINTLN("Possible login replay attack!");
return 0; // FATAL: client table is full -OR- replay attack
}
acl.persistTimestamp(client, sender_timestamp, getRTCClock()->getCurrentTime()); // CUSTOM (TeTeHacko): before acting
MESH_DEBUG_PRINTLN("Login success!");
client->last_timestamp = sender_timestamp;
client->last_activity = getRTCClock()->getCurrentTime();
client->permissions &= ~0x03;
client->permissions |= perms;
acl.persistTimestamp(client, sender_timestamp, getRTCClock()->getCurrentTime()); // CUSTOM (TeTeHacko): admin only, so after the role
memcpy(client->shared_secret, secret, PUB_KEY_SIZE);
if (perms != PERM_ACL_GUEST) { // keep number of FS writes to a minimum