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

Mix error messages to hide user balance #693

Merged
merged 1 commit into from
Dec 17, 2023

Conversation

ekzyis
Copy link
Member

@ekzyis ekzyis commented Dec 17, 2023

One possible (temporary?) solution for #691 would be to not respond with a error message which tells that creating this invoice would exceed a limit.

By just responding with a different error message, the attacker cannot distinguish between "too many invoices" or "invoice would exceed limit". This isn't ideal but still a lot better imo.

I haven't tested this or checked if this would break something but if our code is good, we're not relying on error messages so this change should be fine.

edit: Okay, I will test this, don't want to rely on @huumn superhuman skills to know exactly the impact of every line of code changed just by looking at it, lol

TODO:

  • test

Okay, pretty sure this doesn't break anything. I searched for all kind of substrings of the previous error message, and tested depositing and withdrawing. All good.

@ekzyis ekzyis force-pushed the 691-balance-privacy-leak branch from 76316da to bd500f3 Compare December 17, 2023 12:35
@ekzyis ekzyis marked this pull request as draft December 17, 2023 13:12
@ekzyis ekzyis marked this pull request as ready for review December 17, 2023 14:12
@kepford
Copy link

kepford commented Dec 17, 2023

Fix looks good as a stop gap.

@huumn huumn merged commit db36076 into stackernews:master Dec 17, 2023
1 check passed
@kepford
Copy link

kepford commented Dec 17, 2023

Maybe a longer term solution is to show the original message if the user is funding their own SN wallet. Not sure how difficult that is to do but it would be helpful. Maybe even just posting a help message on the wallet funding page stating the limit. That way it is more obvious to a user trying to fund their wallet.

@huumn
Copy link
Member

huumn commented Dec 18, 2023

Yep agreed. We are already getting people reporting this error and being confused.

@ekzyis
Copy link
Member Author

ekzyis commented Dec 18, 2023

show the original message if the user is funding their own SN wallet. Not sure how difficult that is to do but it would be helpful.

Mhh, since we can tell from the session who is trying to fund which wallet, I think this should be doable. Good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants