-
Notifications
You must be signed in to change notification settings - Fork 42
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
chore: filter v2 tests coverage improvement #931
Conversation
Jenkins BuildsClick to see older builds (7)
|
@chaitanyaprem I would like to wrap up filter tests with covering certain error cases. I wonder if you see the same value in 49435a8 I'd say integrator might appreciate to receive error when sending UnsubscribeAll with wrong peer.ID (host.ID) by mistake. Being an attacker would probably give up looking at peer ID length. So I would say benefit >> security risk to provide error? |
Good one, looks like as of now the result will just be an empty instead of an error indicating no subscription found for the peer which is not a great dev ex. |
It is not a security risk, or it is just a negligible one. To compare, there is also no error when we unsubscribe from non existent topic. Here, topic could be very short string, and could be potentially guessed by executing enough unsubscribe calls. Attacker could then listen to conversation or spam (up to rate the limit). It is good we don't return any error code at that case. I've created improvement #933 |
We need to return the proper errors so that dev ex is better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@chaitanyaprem Would you like to fix #933 some time soon ? This PR has a test which depends on fixing #933, so it won't pass required checks before fixing. |
Just merged the fix on to master. If you update your branch, you should have the fix in it and ci would pass :) |
Description
Batch of tests for Waku Filter v2 to improve coverage
Changes
Tests available to run:
cd go-waku/waku/v2/protocol/filter
go test