News for hackers. Stuff that matters.
Re:Parse, Don’t Validate by mcphage on Thursday November 07, 2019 @09:33PM (#21479531)
I believe Joel Spolsky discussed this in an article, having a wart on the name to represent if strings have raw inputs which are at risk of injection attacks.
Re:Parse, Don’t Validate by hnick on Thursday November 07, 2019 @09:37PM (#21479548)
I wonder why Taint Checking (https://en.wikipedia.org/wiki/Taint_checking) never caught on in more languages.
Re:Parse, Don’t Validate by mcphage on Thursday November 07, 2019 @10:59PM (#21479858)
I mean, I’ve got a pretty good idea why it never caught on in English...
Re:Parse, Don’t Validate by hnick on Thursday November 07, 2019 @11:16PM (#21479921)
It pre-dates the slang term by quite a while, unless it was around back in 1989? I don't recall seeing that online until the last decade or so.
Re:Parse, Don’t Validate by nereye on Friday November 08, 2019 @03:33PM (#21486423)
Wiktionary has it as far back as 1972, see https://en.wiktionary.org/wiki/taint.
Re:Parse, Don’t Validate by mcphage on Friday November 08, 2019 @07:41AM (#21481692)
Dictionary.com claims it dates back to at least 1977, but I have no idea.
Re:Parse, Don’t Validate by jolux on Friday November 08, 2019 @12:56AM (#21480247)
Seems less useful in languages with strong static type systems?
Re:Parse, Don’t Validate by mcphage on Friday November 08, 2019 @10:59AM (#21483436)
It requires a language with dependent types, like Idris.
Re:Parse, Don’t Validate by jolux on Friday November 08, 2019 @11:51AM (#21484043)
I don't think it does require dependent types, actually. Can't it be implemented as a monad? (possibly https://hackage.haskell.org/package/Tainted)
Re:Parse, Don’t Validate by hnick on Saturday November 09, 2019 @07:14AM (#21491065)
It exists in Perl. So I figure it can be implemented in any language.
Re:Parse, Don’t Validate by jolux on Saturday November 09, 2019 @01:18PM (#21493165)
Probably! But I think monads might make it more useful and ergonomic.