2 ms·
> Sanitize your inputs so that it can be safely stored in your data store What kind of data store can't hold all possible strings of characters? Except perhaps
by bloak 7y ago
> Sanitize your inputs so that it can be safely stored in your data store
What kind of data store can't hold all possible strings of characters? Except perhaps '\0'. I'll make an exception for '\0'.
(EDIT: There is of course the question of what you mean by a character. Sometimes it's an octet. Sometimes it's a Unicode code point.)
- jedberg 7y agoIt’s more a question of how you get them in there. For example if your data store is JSON based, you’ll need to escape some strings.
- TeMPOraL 7y agoThat sounds like a broken datastore API. In a properly designed API, you don't need to escape anything, because the API implementation ensures your data doesn't get read as code.