Hacker News new | ask | show | jobs
by streetfighter64 1 day ago
The point of my examples isn't the examples themselves, but rather to illustrate that there's a bunch of complexity that you haven't thought about.

Sure you can keep narrowing your spec as much as you want, but how can you be sure you've covered all "dangerous" (according to you) features? Perhaps there's another image format you need to forbid, how do you know?

Also I'm VERY dubious of your 95% figure. I'd be surprised if more than 50% of current payment pages fulfilled your specs. Remember, you need to exclude any page that uses a SVG image, or uses a CDN for any image, or whatever else that you might later realize is "dangerous".

And no, there's no intrinsic need for TC (nor an intrinsic need for non-TC), it just happens to be that a fully featured programming language is a very convenient way to handle complexity and configuration.

It's in fact probably the more secure way to add configuration, because then the browser writers just need to implement and verify the interpreter of the language, instead of a bunch of arcane specialized components for whatever features a shop might need.

And no, "just don't use those features", isn't a solution. There's a reason no shop in existence probably fulfills your requirements of being "secure", which is that the benefit is entirely theoretical, and the downside is that users want the features you exclude.