Skip to content

Commit

Permalink
fix: don't broadcast public keys if the user is licensed (#5190)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Meadors <[email protected]>
Co-authored-by: Jonathan Bennett <[email protected]>
  • Loading branch information
3 people authored and caveman99 committed Nov 3, 2024
1 parent e01e424 commit 596b173
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modules/NodeInfoModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ meshtastic_MeshPacket *NodeInfoModule::allocReply()
ignoreRequest = false; // Don't ignore requests anymore
meshtastic_User &u = owner;

// Strip the public key if the user is licensed
if (u.is_licensed && u.public_key.size > 0) {
u.public_key.bytes[0] = 0;
u.public_key.size = 0;
}

LOG_INFO("sending owner %s/%s/%s", u.id, u.long_name, u.short_name);
lastSentToMesh = millis();
return allocDataProtobuf(u);
Expand Down

0 comments on commit 596b173

Please sign in to comment.