Live data from Hacker News

Show HN: SimpleKV – an extremely simple, anonymous key-value store

simplekv.com

11–18 of 18 posts

Re: Show HN: SimpleKV – an extremely simple, anonymous key-value store

#11

Perhaps the response should not return raw HTML: # curl https://simplekv.com/path/to/key2 Well, this seems safe...

Thanks for your feedback! I see input sanitation as a double-edged sword: it could potentially prevent some misuse of the service (since it's 100% anonymous), but then ultimately you're the "owner" of your keys (though they're in reality public) and you should be able to write whatever you want in them.

I guess this argument could also be applied to Pastebin? Should it be returning raw HTML if asked to?

Re: Show HN: SimpleKV – an extremely simple, anonymous key-value store

#13
post #11

Perhaps the response should not return raw HTML: # curl https://simplekv.com/path/to/key2 Well, this seems safe...

Thanks for your feedback! I see input sanitation as a double-edged sword: it could potentially prevent some misuse of the service (since it's 100% anonymous), but then ultimately you're the "owner" of your keys (though they're in reality public) and you should be able to write whatever you want in them. I guess this argument could also be applied to Pastebin? Should it be returning raw HTML if asked to?

The "Content-Type" HTTP header is "text/html; charset=utf-8", you could make it "text/plain; charset=utf-8" to prevent HTML from being parsed.

Re: Show HN: SimpleKV – an extremely simple, anonymous key-value store

#14
post #12

Would it be possible to require a key within a different url parameter? That way, one would need to know both the name and the api key of the field to edit/delete it? A key would be generated and returned in response to the initial creation request.

I'll see how to integrate such a feature in SimpleKV so that it keeps being simple. I like the idea a lot, thanks!

Re: Show HN: SimpleKV – an extremely simple, anonymous key-value store

#15
post #13
post #11

Earlier quoted context omitted.

Thanks for your feedback! I see input sanitation as a double-edged sword: it could potentially prevent some misuse of the service (since it's 100% anonymous), but then ultimately you're the "owner" of your keys (though they're in reality public) and you should be able to write whatever you want in them. I guess this argument could also be applied to Pastebin? Should it be returning raw HTML if asked to?

The "Content-Type" HTTP header is "text/html; charset=utf-8", you could make it "text/plain; charset=utf-8" to prevent HTML from being parsed.

That makes total sense, cheers!

Re: Show HN: SimpleKV – an extremely simple, anonymous key-value store

#16
Interesting to see how you implemented this. I've created a similar service like this for internal use at a startup I'm working on. The basic idea is the same but I also implemented key deletion (HTTP DELETE) on top of read and write.

I read in one of the comments you're using Flask on the backend, are you storing the key/values in a SQL database? My backend is written in Go and data is serialized to disk in a binary format.

edit: I just saw that you also implemented a delete feature, my bad for not reading all the examples carefully ;-)

Re: Show HN: SimpleKV – an extremely simple, anonymous key-value store

#17
post #7
post #4

Good MVP. I wonder where this will lead.

Thanks! My use case was very specific, but the concept is so simple I was wondering what people would do with it.

Be careful. These things tend to morph, mutate and become turing-complete. If it grows an emacs step back quietly and slowly. Just remember to feed it plenty of parentheses and you'll be fine.
Post reply on HN