shinypb / openkeyval

OpenKeyval.org is a completely open key-value data store, exposed as a drop-dead simple web service. The goal is to make this a very easy way to persist data in web applications.
http://openkeyval.org
Other
137 stars 35 forks source link

Feature Request: api limitations to prevent exploiting/overload #9

Open tomash opened 14 years ago

tomash commented 14 years ago

hi guys,

today I've hacked something both awesome and wrong. long story short, this commit: https://github.com/tomash/flyingv/commit/77e3a1111acf9dfc5d1bba625d4c27acf88f2317 lets one store files in OKV, with auto splitting of large files (and auto merging on retrieval) to save them into separate keys.

this can be used to put large amounts of data on OKV. at the moment the only limit is that "master" value that stores a JSON array of keys of all the file chunks (although the file can be rebuilt without that, as every chunk value stores the key of "next" chunk) -- this array of keys cannot be larger than 64kB, but even assuming 100 bytes for "file chunk" key it gives 640 chunks which means 40 meg of file size limit.

I don't want to pull this code off github and don't want OKV to go down because of exploitation -- maybe you can impose some limits? (POST requests per hour or something?)

shinypb commented 14 years ago

Hi tomash; Thanks for the heads up. dustball and I were just discussing this sort of scenario last night; it's pretty likely that we'll build in an hourly rate limit.

At any rate, this is a neat hack (I'm reminded of TinyDisk — http://tech.slashdot.org/article.pl?sid=05/10/25/0350222). Thanks for hacking with OpenKeyval. :)

— Mark