3 ms·
XSS is a malicious version of the more general problem of not escaping user inputs. its much easier to escape on output rather than input as you can't really te
by koolba 10y ago
XSS is a malicious version of the more general problem of not escaping user inputs. its much easier to escape on output rather than input as you can't really tell what's "acceptable". It's also more robust as out of band updates (say direct database updates of comments) get outputted correctly too.
If I have a comment forum with input filtering (rather than output escapong) I can't restrict it to just letters numbers and punctuation or the user's can't discuss HTML tags!
- code_duck 10y agoThat makes sense. The objection I feel here is the inconsistency - why accept the input in the first place, only to delete it with this button? An above comment suggests rules may be updated over time, which could explain their thinking.
- koolba 10y agoBecause they don't properly escape things everywhere (anywhere?) and the DB update button is a kludge to deal with existing messed up data breaking pages they don't know about. It was probably less than an hours work to add that button vs. hundreds of hours to track down all the unescaped outputs.