2 ms·
I think what you are saying is to validate, not sanitize. Sanitize (as I have understood it) usually means to "modify to be safe", while you are talking about
by SahAssar 7y ago
I think what you are saying is to validate, not sanitize.
Sanitize (as I have understood it) usually means to "modify to be safe", while you are talking about rejecting invalid responses.
- marcosdumay 7y agoIf your rules say comments will be truncated to 1000 chars, yo do it on the input. If your rules say all prices are in dollars, but your frontend accepts other currencies, you convert on the input, and overstaff the consumer support. Honestly, those names mean a lot of different stuff to different people. It's not good that there are so many, it's more a consequence of the widespread of bad practices.
- SahAssar 7y agoI think what people thinking of the term like me (sanitize means modify, validate means accept/reject) will think is that if your rule is "comments will 1000 chars or less", then the validate reasoning would say reject the 1001 chars comment, while the sanitize reasoning would say truncate to 1000 chars. Do you have a different reading of the terms?