-
Notifications
You must be signed in to change notification settings - Fork 252
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
Validate posts in dhtput #12
Comments
Is this what you were imagining? twister.cpp: http://pastebin.com/Dp6pzjf4 |
Very close! ;-) Actually I didn't meant the dhtput RPC, but rather the node.cpp part, where it receives the request to store a certain value. This is where the real protection for DOS should go. I'm happy you reach this issue because there is a very interesting decision here: the tradeoff between future expansion and DOS protection. If we decide to validate all requests of known dht resources it will make sense as well to forbid unknown resources, right? otherwise they are given a kind of privilege. unknown single resources for known users are currently accepted, so i may easily create {"user", "pgp", "s"} in twister-html without requiring core update. Should we forbid this to protect users from somebody storing arbitrary resources on the network? Then the future expansion might be harder. it is a though tradeoff. maybe some sort of prioritization is better suited so nodes may accept the unknown resources but they'd be always discarded first. |
Like I said, you don't need to give up flexibility to maintain security. |
Use validatePostNumberForUser() when dhtput resource is known to be a post (like "postX", "replies", "mention" and "hashtag").
The text was updated successfully, but these errors were encountered: