Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only PKC encrypt when packet originates from us #5267

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

GUVWAF
Copy link
Member

@GUVWAF GUVWAF commented Nov 6, 2024

This should fix the issue when a node using firmware <2.5 sends a direct message to a 2.5 node, and it hops through another 2.5 node. Currently, as reported on Discord, the intermediate 2.5 node would PKC encrypt it with its own public key when the DM was received on its primary channel, because it could decrypt it and then before rebroadcasting, this passes:

// Don't use PKC if it's not explicitly requested and a non-primary channel is requested
!(p->pki_encrypted != true && p->channel > 0) &&

Only when a packet originates from us, we should PKC encrypt.

@psyh0x
Copy link

psyh0x commented Nov 6, 2024

you meant to say its sent from 2.4 -> 2.5 -> 2.5
the message will not be received on the last 2.5 node.

@GUVWAF
Copy link
Member Author

GUVWAF commented Nov 6, 2024

No, right? In your case it's sent from a 2.4 device, then goes through a 2.5 device and received by a 2.5 node.

@psyh0x
Copy link

psyh0x commented Nov 6, 2024 via email

@caveman99 caveman99 merged commit 3bd3911 into meshtastic:master Nov 6, 2024
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants