Re:Don’t try to sanitize input, escape output (2020)
by wvenable on Thursday January 13, 2022 @12:30PM
(#29923711)
The confusion is what is input and what is output. The string "Bob'; drop tables students --" should not be sanitized/encoded on *input* to the application. However, if you're not using parameterized queries, it should be encoded on *output* to the database.
Data should only be sanitized in transit and not stored in an sanitized form. That's what the article is really saying.
The article title says NOT to sanitize inputs. perhaps it's that nuance doesn't fit in a headline, but eh...