by FriedrichN · 5y ago · 0 comments
I think this is a bad idea, I just know there will be people who will make applications that will rely entirely on this API with disastrous results.
It's okay, but mostly a waste of time, to sanitize data before storing it.
You must sanitize data when outputting it.
Why? Because someone could get the data into storage in another way, or new vulnerabilities might be discovered that you aren't sanitizing for before storage.
While I'd prefer the inputs stored server-side to be pre-sanitized, I can see the benefit for just not touching it and shrugging.
Either way, I think there should be a warning that it should never be used for input sanitation.