Ruby Feature #16131: Remove $SAFE, taint and trust (2019)

5 points by gioele


insanitybit

Therefore I think Taint checking mechanism is unusable on the current Ruby ecosystem.

Wouldn’t you just open a support ticket with Rack to get them to support it? I suspect the issue there would be that it’s unclear what “tained” means. Rack has presumably parsed the value in some way, but that way may not be “is valid for a sql query” etc, which would happen later. “tainting” is just very broad since a string may need to be validated in different contexts.

The way to solve this more generally is just to have richer types, I think.