News for hackers. Stuff that matters.
Re:Why is Stack Overflow trying to start audio? by ehnto on Thursday June 27, 2019 @02:29AM (#20292188)
It's amazing to me that an advert can run arbitrary javascript at all. It wasn't long ago that this would have been seen as a massive security risk by site owners and ad platforms alike. I'll give them the benefit of the doubt and assume that perhaps it's a structured service provided by the ad network, and the ad buyer just checks a box. But as a site owner even that would be too much for me.

I've been playing around with ideas about more ethical analytics and advertising, and I think they're pretty easily built platforms. But the question is are they marketable? Would GloboCorp and MarketingCo give up the ability to track consumers so closely in favor of a more ethical approach, or has it been too valuable for them to give up?

Re:Why is Stack Overflow trying to start audio? by dTal on Thursday June 27, 2019 @06:20AM (#20293130)
>It's amazing to me that an advert can run arbitrary javascript at all.

I'm not fully up to date with how these things are usually set up - is there anything in the web security model that prevents "ads" from exfiltrating arbitrary information from any page that they're on? Could an ad read my keystrokes, or scrape private messages?

Re:Why is Stack Overflow trying to start audio? by londons_explore on Thursday June 27, 2019 @08:23AM (#20293759)
Ads are iframed, and don't have permissions to do anything to the host page.

Doesn't stop them fingerprinting the browser though

Re:Why is Stack Overflow trying to start audio? by tinus_hn on Thursday June 27, 2019 @11:02AM (#20295020)
Typically ads are not in iframes, they are loaded by Javascript from the ad network and can do whatever they want.
Re:Why is Stack Overflow trying to start audio? by smilliken on Thursday June 27, 2019 @11:13AM (#20295123)
There's multiple nested iframes and scripts loaded at every level. All variations are possible.
Re:Why is Stack Overflow trying to start audio? by tinus_hn on Thursday June 27, 2019 @12:52PM (#20296196)
Sure, but obviously it’s more valuable if you give the ad access to your DOM so it can ‘optimize the ad placement’.
Re:Why is Stack Overflow trying to start audio? by ChrisSD on Thursday June 27, 2019 @07:51AM (#20293580)
It is possible to restrict ads using CORS headers, sandboxed iframes and cross origin restrictions. However this is rarely done effectively. Often the ads have a ridiculous level of access.
Re:Why is Stack Overflow trying to start audio? by Aeolun on Thursday June 27, 2019 @06:52AM (#20293287)
Short answer is yes.
Re:Why is Stack Overflow trying to start audio? by dTal on Thursday June 27, 2019 @07:27AM (#20293450)
Yes, the security model stops them, or yes, they can do those things?
Re:Why is Stack Overflow trying to start audio? by gbuk2013 on Thursday June 27, 2019 @07:52AM (#20293582)
Yes, they can do those things.
Re:Why is Stack Overflow trying to start audio? by vbsteven on Thursday June 27, 2019 @03:10AM (#20292331)
It’s not the internet we want but it is the one we have. In the end it is your own responsibility for which code gets executed on your machine.

I run NoScript with all JS blocked by default and only whitelist the domains I want. On most sites you can get by with no JS or just scripts from the same domain whitelisted. Maybe a CDN from time to time

Re:Why is Stack Overflow trying to start audio? by kowdermeister on Thursday June 27, 2019 @07:07AM (#20293361)
It's indirectly what most people wanted: good content for free.
Re:Why is Stack Overflow trying to start audio? by vbsteven on Thursday June 27, 2019 @09:46AM (#20294266)
In a way yes, but for me it's not about that. It's about not letting everyone and their mother execute their code on my machine for whatever reason. Ads, tracking, cryptomining, surveillance.

Mind you that I am only running NoScript and not a "real" adblocker. Show me ads in a static image and I'm fine with that. Selfhost the ads on your own domain and you are also going to get whitelisted.

I mainly do it for cases like this where Stackoverflow has enabled an ad network that is pushing code to all of their users that is doing some weird things (like querying/opening audio devices) and stackoverflow is not even aware that it is doing that. What if it was a cryptominer?

Re:Why is Stack Overflow trying to start audio? by seitling on Thursday June 27, 2019 @08:52AM (#20293925)
"... only whitelist the domains I want ..."

Well, this is easy to exploit. Use an URL under my domain and proxy to the ad server. JavaScript is a problem. Simple as that.