3 ms·
Yeah at best that'll break your site when the library has the next update, changing random things that nobody asks for. And you'll get a swapped malicious file
by moffkalast 5y ago
Yeah at best that'll break your site when the library has the next update, changing random things that nobody asks for. And you'll get a swapped malicious file at worst.
- michaelt 5y agoWell, back when that was common you'd import a numbered version, like "https://cdn.example.com/js/library-v1.2.3.js https://cdn.example.com/js/library-v1.2.3.js" which, unless the CDN was evil, would be immutable. Someone even came up with a standard for "subresource integrity" [1] where you could specify a checksum of the thing you were importing from a CDN, so it couldn't be replaced by an evil CDN. I don't believe it ever achieved widespread use. [1] https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity https://developer.mozilla.org/en-US/docs/Web/Security/Subres...
- dexterdog 5y agoIt doesn't need widespread use since you get the benefit of using by just using it on your own site.