News for hackers. Stuff that matters.
Re:Don’t try to sanitize input – escape output by Someone on Thursday February 27, 2020 @03:12PM (#22437284)
”Change < to &lt; in the database?”

Of course not. The fact that “<“ is risky isn’t part of the string, it’s part of the output format (HTML).

If you were to write that string to json or csv, you would have to special-case double quotes. In. POSIX shell, asterisks and question marks need special attention, etc.

There are no comments on this comment yet.