fix(NodeInfoModule): update user handling in allocReply to prevent global state clobbering
This commit is contained in:
@@ -158,8 +158,8 @@ meshtastic_MeshPacket *NodeInfoModule::allocReply()
|
|||||||
ignoreRequest = true;
|
ignoreRequest = true;
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
ignoreRequest = false; // Don't ignore requests anymore
|
ignoreRequest = false; // Don't ignore requests anymore
|
||||||
meshtastic_User &u = owner;
|
meshtastic_User u = owner; // deliberate copy: the licensed strip below must not clobber the global owner state
|
||||||
|
|
||||||
// Strip the public key if the user is licensed
|
// Strip the public key if the user is licensed
|
||||||
if (u.is_licensed && u.public_key.size > 0) {
|
if (u.is_licensed && u.public_key.size > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user