Bug/skale 5059 limit number of filters per ip#1062
Draft
dimalit wants to merge 10 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1062 +/- ##
===========================================
+ Coverage 50.07% 50.36% +0.28%
===========================================
Files 295 295
Lines 35533 35700 +167
===========================================
+ Hits 17793 17979 +186
+ Misses 17740 17721 -19 🚀 New features to boost your workflow:
|
|
SUGGESTIONS BEFORE MERGE:
|
dimalit
commented
Apr 6, 2022
Contributor
Author
There was a problem hiding this comment.
I see 2 drawbacks of such approach:
- UnDoS protection is coupled with the implementation (of logs/filter functionality). Architecturally more correct is to separate these two.
- It unnecessarily introduces ("manual") parsing of filter/logs requests through rapidjson (and not through plain libjsonrpccpp as before. This can can introduce new possible bugs (in this new code).
2a) As a side note I should mention that currently rapidjson-related part in SkaleServerOverride is implemented in a very "workaround" way and needs re-architecture. Growing it further with more calls would complicate things.
As a solution, I'd propose to implement this protection as an added layer in SkaleServerOverride class. It already has unddos protection - so this addition looks consistent. It can be implemented through something similar to mod_rewrite of Apache - i.e. scan request with simple regexp or plain c++ code and do appropriate filtering.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.