"When you allow third parties to run script on your site, you’re entirely beholden to them; they can run anything they like in the context of your site" I've seen a fair few Internet banking web sites pulling scripts from over a dozen third parties, mostly for tracking and advertising, but even for trivial things like social media. On their customer login pages. It's beyond me how they can consider this to be an acce…
I wonder how many websites' users would be compromised if code.jquery.com got hacked.
How I got XSS’d by my ad network
11–20 of 62 posts
Re: How I got XSS’d by my ad network
#12Earlier quoted context omitted.
I wonder how many websites' users would be compromised if code.jquery.com got hacked.
doesnt have to be literally "hacked", just a change of the dns records is enough.
Re: How I got XSS’d by my ad network
#13This is why browsers should have an option "Block third party javascript" similar to "Block third party cookies". With http2, relevant javascript files will be increasingly hosted on the same domain anyway and that option would become increasingly relevant.
Re: How I got XSS’d by my ad network
#14Earlier quoted context omitted.
With http2, relevant javascript files will be increasingly hosted on the same domain Why is that?
There's a limit on the number of simultaneous requests per domain with http1, which will not be present in http2 [0]. This limit meant that for best performance, static files should be served from multiple (sub)domains. [0] https://mattwilcox.net/web-development/http2-for-front-end-w...
HTTP/2.0 supports _single connection multiplexing_, which means that domain sharding (splitting into different domains) is a _bad practice_.
Re: How I got XSS’d by my ad network
#15This is why browsers should have an option "Block third party javascript" similar to "Block third party cookies". With http2, relevant javascript files will be increasingly hosted on the same domain anyway and that option would become increasingly relevant.
I see the need, but fear that if this became a common thing, you'd end up with websites proxying external scripts through their own domain.
Re: How I got XSS’d by my ad network
#16Earlier quoted context omitted.
doesnt have to be literally "hacked", just a change of the dns records is enough.
Well, once you hotlink jquery in your website at least use the https link (assuming your site is on https too).
In short; no, just a compromised dns record is not enough.
Re: How I got XSS’d by my ad network
#17The fact that these ads disguise themselves as content that the site owner is recommending is particularly insidious, since it will likely encourage people to click through thinking that they can trust the content.
Re: How I got XSS’d by my ad network
#18If you're going to put adverts on your site, always put them within an iframe, pointed at a separate "adverts" only domain. This will ensure they can't execute javascript within your own website context.
Re: How I got XSS’d by my ad network
#19"When you allow third parties to run script on your site, you’re entirely beholden to them; they can run anything they like in the context of your site" I've seen a fair few Internet banking web sites pulling scripts from over a dozen third parties, mostly for tracking and advertising, but even for trivial things like social media. On their customer login pages. It's beyond me how they can consider this to be an acce…
I wonder how many websites' users would be compromised if code.jquery.com got hacked.
I surf with third party cookies and referers (via RefControl) disabled, and these should be the defaults
Re: How I got XSS’d by my ad network
#20If you're going to put adverts on your site, always put them within an iframe, pointed at a separate "adverts" only domain. This will ensure they can't execute javascript within your own website context.