refactor: Observers/ignored peers can now send and receive custom packets#2728
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2728 +/- ##
==========================================
- Coverage 73.11% 73.05% -0.06%
==========================================
Files 149 149
Lines 30517 30499 -18
==========================================
- Hits 22313 22282 -31
- Misses 8204 8217 +13 ☔ View full report in Codecov by Sentry. |
c6e2920 to
993d192
Compare
|
this allows a peer thats is muted (observer) to send packets. i don't think this is a good thing. spam blocking on the receiver side is worse than blocking on the sender side. |
Nothing stops a malicious peer from modifying their source code and spamming illegitimate custom packets to a group, regardless of their permissions (apart from removing them from the group). The only thing this PR changes in that respect is that the spammer no longer needs to remove those client-side checks themselves. However, in order to spam illegitimate custom packets, they will still need to modify the source code, and removing the client-side checks at the same time is trivial. |
…kets The Observer role was intended to prevent peers from being disruptive and/or interacting with other peers in the group. It wasn't intended to cripple custom protocols running on-top of the groups such as file sharing and message syncing. In cases where it might be undesirable for observers to use custom packets (e.g. starting a file transfer) the client will have the ability to decide whether or not to allow it.
993d192 to
99e0bcc
Compare
The Observer role was intended to prevent peers from being disruptive and/or interacting with other peers in the group. It wasn't intended to cripple custom protocols running on-top of the groups such as file sharing and message syncing.
In cases where it might be undesirable for observers to use custom packets (e.g. starting a file transfer) the client will still have the ability to decide whether or not to allow it.
This change is