3 ms·
> Most people still want to get their work done, not caring about security at all. That's exactly why tools and languages should be designed for security, so t
by chriswarbo 5y ago
> Most people still want to get their work done, not caring about security at all.
That's exactly why tools and languages should be designed for security, so that their users don't have to care.
I also disagree about 'not caring about security at all': security is opposite to functionality, since it prevents things rather than enabling them. If developers truly didn't care about security, we would see far more use of 'eval' as a way to plug systems together. Instead, we see a huge amount of effort spent on defining data and interchange formats, parsing parameters, branching on their values, etc.
For example, any time an API/URL provides options like '?sortField=age&sortDirection=DESC', that indicates developers who do care about security. In contrast, we can make a far more flexible API by accepting arbitrary code instead, like '?postProcess=(x) => x.sortBy((elem) => elem.age).reverse'; and this is much easier to implement, since we could just send it to 'eval()'.