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

tighter recps guards #390

Open
mixmix opened this issue Sep 21, 2022 · 1 comment
Open

tighter recps guards #390

mixmix opened this issue Sep 21, 2022 · 1 comment
Labels
bug 🐛 Something isn't working

Comments

@mixmix
Copy link
Member

mixmix commented Sep 21, 2022

the create() method uses this to pick the recps for encryption

const recps = fullOpts.recps || fullOpts.content.recps

https://github.com/ssbc/ssb-db2/blob/master/core.js#L663

The docs don't mention which wins if both set. Also this code allows both the be set, and for a message to be encrypted to different people than it advertises to.

I'm not sure if this is a footgun... my gut tells me you should never have them be different

@staltz
Copy link
Member

staltz commented Sep 21, 2022

The intention was to gradually move away from content.recps and prefer recps because content.recps ends up getting deleted from content actually I'm wrong, shit, I thought that was how it worked. I guess we need to prefer content.recps because that's how other peers get to know who are the participants in a box1 private chat. :cringe:

So yes, somewhat footguny.

@staltz staltz added the bug 🐛 Something isn't working label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants