3 ms·
TL;DR: Perl's taint mode is coming to JavaScript.
by oasisaimlessly 3y ago
TL;DR: Perl's taint mode is coming to JavaScript.
- xlii 3y agoNot sure why you’re getting downvoted. That was my first thought too (a tongue in cheek one, so maybe that’s part that’s missing?) Taint mode is one of the concepts I’ve been thinking about a lot (Rust can implement it nicely with type wrapping and it’s great for working with user input). There was an old joke that can be paraphrased into another one: so supposedly you either die a loved language or live long enough to become a Perl?
- gpvos 3y agoWhile the idea is similar, the main difference is that Perl assigns the taint tag to input strings and requires you to do a special operation to cast it away (and also you can just print a tainted string!, and Perl does several additional checks, e.g. on other-writable directories), while this new Javascript system requires you to specially bless all output strings, even ones you generate without involving any input data.