News for hackers. Stuff that matters.
Re:A JavaScript browser library fails due to an adblocker bl... by kevingadd on Sunday July 09, 2017 @08:31AM (#14729430)
An interesting related anecdote on this is that at least in Chrome, adblockers can also interfere with extensions' attempts to load scripts, load stylesheets, or open windows. I maintain an extension with a smallish active userbase (~20k people) and a couple different times I've encountered mysterious failures that were the result of clumsy keyword blocklists in ublock/adblock/etc - for example an extension asset (packed into the extension, not on a web server!) containing the word 'popout' caused it to get killed silently, and renaming it made it work.

Naturally you can troubleshoot a lot of this with 'does it work if you disable adblock?' but it's a real pain to have to convince users that they can't use your software along with their broken adblocker.

Re:A JavaScript browser library fails due to an adblocker bl... by nsgi on Sunday July 09, 2017 @08:40AM (#14729467)
> it's a real pain to have to convince users that they can't use your software along with their broken adblocker

The reality for most extension developers is that our extension is less essential to users than their adblocker, and if they had to choose between them they would choose the latter.

Re:A JavaScript browser library fails due to an adblocker bl... by vbrandl on Sunday July 09, 2017 @08:42AM (#14729475)
To be honsest, I might do the same. Surfing the web without an adblocker nowerdays isn't much fun, to say the least
Re:A JavaScript browser library fails due to an adblocker bl... by goodplay on Sunday July 09, 2017 @08:44AM (#14729485)
Can you really blame them? Websites became hostile to users and users reacted. I don't know what your software is, and this certainly isn't directed at you, but if I'm forced to make a choice between using an ad blocker or using some software, I'll always choose the ad blocker (unless I was forced to use said software), especially if there are alternatives.

There are no real alternatives to using an ad blocker.

Re:A JavaScript browser library fails due to an adblocker bl... by DanBC on Sunday July 09, 2017 @08:50AM (#14729517)
Don't assume most people are polite and reasonable like you. Many people are arseholes.

You're choosing to use either the ad-blocker, or the software, and you've chosen the ad-blocker.

You can see how tiresome it would be to have a flood of rude people saying "your software sucks", when there's nothing wrong with the software. There's a problem with the ad-blocker that the user has. The bug report should go to that ad-blocker.

You can also see how it must be a bit frustrating to have people saying "ZOMG why can't I use both? Fix your software so that I can use both!", when the fix needed is only achievable by the ad-block creator.

Re:A JavaScript browser library fails due to an adblocker bl... by rsj_hn on Sunday July 09, 2017 @12:54PM (#14730611)
The thing is, the software does suck some of the time. Here too, I'm not saying your software sucks, but web developers have developed several bad habits that put users at risk for no particular reason other than sheer laziness.

here are some examples:

1) Instead of putting third party scripts under your own version control and hosting them yourself, you host them from a "free" CDN which then stores tracking cookies in the origin of the user loading the script. How hard is it to serve all the js libraries you need from your own server?

2) You like some nice widget, like Google Maps. But hey, to use this widget, you need to load a third party script in your origin. No biggie, it's better than paying for a maps widget, right? Except now the user has a tracking cookie in your origin and you didn't disclose this or give the user an option to opt out. What you could have done is loaded that map inside an iframe that is served from a content domain or throwaway domain, so that there is a separation between your cookies and your scripts and the third party cookies and their scripts. This goes for all other widgets as well.

In the above two examples, the developers aren't being paid or are receiving revenue in exchange for installing tracking cookies in their origin, they are just letting it happen because they don't care and they want things to be easier on them.

I get that there are ad supported websites, and if this is your business model, then you are free to give it a go -- but I get upset when the justification for the tracking cookie is developer convenience rather than any kind of business decision to drive revenue.

Re:A JavaScript browser library fails due to an adblocker bl... by seangrogg on Sunday July 09, 2017 @05:17PM (#14731709)
WRT #1, while it certainly isn't difficult to serve libraries from your own server taking advantage of a CDN allows you to take advantage of browser caching and offloads bandwidth.

I'm not saying that CDNs should be setting tracking cookies, mind - I'm just pointing out that as a developer a CDN helps me improve the experience of my users and as a user a CDN helps you reduce my costs to provide whatever value I am to you.

Honestly, if browsers were able to quickly determine that my "reactXX-X.min.js" was the same as Facebook's I would probably just eat the occasional edge costs.

Re:A JavaScript browser library fails due to an adblocker bl... by rsj_hn on Monday July 10, 2017 @02:06AM (#14733717)
Well, that's the thing -- there are good CDNs out there, but they expect you to pay. But why is the developer making the decision of making the user pay for it with their privacy? Without any kind of notification or agreement, or even discussion, really, with the people who should be deciding this stuff.

Now perhaps I'm wrong, and this is not a developer decision at all but a decision from the business side, where they weighed the privacy issues against the slower performance against the cost of paying for a CDN, and decided this was the right way to go, then they instructed their developers to start loading all these scripts from third party free CDNs.

Except, I've been doing this thing for over a decade, and developers keep sneaking this shit in, and then acting surprised that it's not OK to pull jQuery from ye-favorite-free-CDN, but they need to stick the thing into static resources where it will be served from our CDN. And I keep finding devs doing this also when I do pentests of third party sites, and the response from the security POC is usually "we had no idea this was being loaded from the free CDN. We even have a contract to use Akamai, we just didn't know".

At the same time, I keep seeing this in open source software, even in examples and tutorials, where supposedly the user speed is not so crucial, as well as stackoverflow, and I also know there is a lot of cut and paste going on, so I still think this is just bad hygiene on the part of the developer community, where people are just very cavalier about letting third parties inject javascript into your origin.

But you do have a fair point. End of rant.

Re:A JavaScript browser library fails due to an adblocker bl... by pwg on Sunday July 09, 2017 @10:30AM (#14729880)
> when the fix needed is only achievable by the ad-block creator.

It seems to me that there are two possible fixes. One, the ad-block creator updates their list, yes. But the other is the extension writer renames the file that is triggering the ad-blocker so the ad-blocker is no longer triggered.

The only one of those two fixes that is within the direct control of the extension writer is renaming the file within the extension that is triggering the ad-blocker.

Re:A JavaScript browser library fails due to an adblocker bl... by akvadrako on Sunday July 09, 2017 @11:17AM (#14730093)
Except software which doesn't work with an adblocker does "suck". Sure, potential users could phrase it more politely, but for many of them (me included), it's a minimum requirement.

At least "sucking" is better than being totally useless.

Re:A JavaScript browser library fails due to an adblocker bl... by DanBC on Sunday July 09, 2017 @12:21PM (#14730459)
But in the example given the reason the software doesn't work isn't because it needs ads. It's because the ad blocker is broken.
Re:A JavaScript browser library fails due to an adblocker bl... by nsgi on Sunday July 09, 2017 @05:30PM (#14731774)
It's applying a heuristic that triggers a false positive in many cases. Most ad blocking rulesets do tend to include very basic rules like that. I don't know how many ads they actually still catch but if it's a significant number then it's probably a justified one.
Re:A JavaScript browser library fails due to an adblocker bl... by Doctor_Fegg on Sunday July 09, 2017 @08:41AM (#14729468)
Yes. We seem to have moved from a position of "four different browsers with differing behaviour" to "four consistent browsers with consistent behaviour, each with hundreds of potential content-rewriting extensions that may arbitrarily break your site in unexpected ways". I'm not convinced this is an improvement.
Re:A JavaScript browser library fails due to an adblocker bl... by makecheck on Sunday July 09, 2017 @10:19AM (#14729829)
Well we also used to have mostly non-HTTPS, where wifi networks and ISPs could and did insert crap into pages. I much prefer now being able to guarantee that what the user downloads is what the site provided. At least then the "turn everything off and see if it works now" option should be viable.
Re:A JavaScript browser library fails due to an adblocker bl... by Spivak on Sunday July 09, 2017 @08:52AM (#14729519)
It seems to be an improvement for the user.
Re:A JavaScript browser library fails due to an adblocker bl... by gorhill on Sunday July 09, 2017 @09:55AM (#14729744)
I'm puzzled. Content blocking extensions can't interfere with your extension's internals, and can't interfere with network requests made by another extension.

If your extension injects resources in the DOM, than a content blocker can interfere with the proper loading or rendering of these resources.

However I am very surprised about your statement that a content blocker extension intefered with your extension assets, my understanding is that should not be possible. You mind disclosing what is your extension?

Re:A JavaScript browser library fails due to an adblocker bl... by kevingadd on Sunday July 09, 2017 @10:25PM (#14732989)
Most Chrome extensions need to interact with content, so if you want to do that you have to run code inside the content context. Adblockers can intercept any requests you make, even if it's to extension content (i.e. not over the internet, not to an ad/tracking server). This goes so far that they will silently block attempts to open a popup window (in this case, in a click handler to open extension-specific UI for the user.)

The content was under chrome-extension:// and was just an html file. Incidentally I use ublock. I'd be happy to help you troubleshoot this if it's possible to fix the issue.

Re:A JavaScript browser library fails due to an adblocker bl... by nsgi on Sunday July 09, 2017 @05:36PM (#14731809)
You can't inject a content script into another extension's page but the last time I used it the webRequest API could intercept internal requests, including those from extensions. Although they're planning to crack down on e.g. extensions redirecting search requests from the new tab page and the omnibox.
Re:A JavaScript browser library fails due to an adblocker bl... by kmfrk on Sunday July 09, 2017 @10:12AM (#14729804)
Using Little Snitch can be pretty eye-opening; I wouldn't for the life of me have imagined that my terminal installations of packages with stuff like Homebrew would send calls to Google Analytics. It's bloody everywhere.
Re:A JavaScript browser library fails due to an adblocker bl... by vbrandl on Sunday July 09, 2017 @10:22AM (#14729841)
That one is actually documented in their repository: https://github.com/Homebrew/brew/blob/master/docs/Analytics....
Re:A JavaScript browser library fails due to an adblocker bl... by throwanem on Sunday July 09, 2017 @11:10AM (#14730062)
And aroused considerable controversy, here and elsewhere, when it was new. The two major active discussions here, 7 months and a year ago respectively:

https://news.ycombinator.com/item?id=13034936

https://news.ycombinator.com/item?id=11566720

I'm not too terribly fussed over it, especially considering what it must cost to support Homebrew - if analytics data helps the maintainers make more effective choices around how to allocate limited resources, that seems to me like a good goal, and I'm not sure how providing information on packages I've installed via Homebrew, to be included in anonymized reports on packages ~everyone has installed in Homebrew, poses any meaningful risk to me.

That said, if you feel otherwise, see https://github.com/Homebrew/brew/blob/master/docs/Analytics.... on how to make Homebrew not send analytics data any more.

Re:A JavaScript browser library fails due to an adblocker bl... by vbrandl on Sunday July 09, 2017 @08:34AM (#14729446)
Shouldn't adblockers whitelist local request to prevent something like this?
Re:A JavaScript browser library fails due to an adblocker bl... by mp3geek on Sunday July 09, 2017 @09:17AM (#14729589)
Why whitelist, when its easier to rename a file?
Re:A JavaScript browser library fails due to an adblocker bl... by mp3geek on Sunday July 09, 2017 @09:43AM (#14729689)
Also the filter in question "/beacon.js" is 3 years old in Easyprivacy, to be exact "Feb 23, 2014". I could understand if it was a recent commit but its not, the onus shouldn't be on the List authors to fix it, but the site owner (yourself) to fix it.
Re:A JavaScript browser library fails due to an adblocker bl... by kiallmacinnes on Sunday July 09, 2017 @11:12AM (#14730070)
Is this meant to be sarcastic? becaon.js is a perfectly valid name for a JavaScript filename, being forced to name your files something different from their content just to placate ad blockers dodgy blocklists is not right.

Even more not right though, is every developer having to check every blacklist to see if their component name happens to also be used in advertising. Is this really what your suggesting?

Then there's the whole *ad.js blacklist another commenter brought up, this is frankly just a sign of a terrible blocklist.

And new entries that are just as bad get added all the time, so now every developer has to check every blocklist every single day if they want to keep their site running smoothly.

(A happy user of an ad blocker, who is aware that 9 time out of 10, when a site I'm using is broken, it's the ad blockers fault - not the sites)

Re:A JavaScript browser library fails due to an adblocker bl... by bangonkeyboard on Sunday July 09, 2017 @08:54AM (#14729527)
If extensions can interfere with each other's internal resources then the real breakage is in the browser's extension mechanism.
Re:A JavaScript browser library fails due to an adblocker bl... by PrivWeeble on Sunday July 09, 2017 @11:46PM (#14733252)
Well normally you wouldn't want one browser extension to interfere with another extension. However, there are contexts where that is very beneficial. Take a security or privacy extension which correctly identifies a harmful resource load. It doesn't matter whether that resource is being loaded in a content tab, loaded by another extension behind the scenes, or is local vs remote. It it still a harmful load. So a protective extension should be able to detect it, then inform the user and/or perform an appropriate blocking action.

This, like some other special powers, is something that the user should have to explicitly grant to an extension via permissions interface.