Add an intervention for imgur.com
Categories
(Web Compatibility :: Interventions, enhancement)
Tracking
(Not tracked)
People
(Reporter: ksenia, Unassigned)
References
(Blocks 1 open bug, )
Details
As Thomas discovered in https://bugzilla.mozilla.org/show_bug.cgi?id=1742344#c4 it's possible to temporarily fix the issue with imgur.
Ah, actually their code does properly check for the existence of service workers, the problem is that they assume that if
window.caches
is defined, callingwindow.caches.keys()
will not fail. But in private browsing mode it throws a SecurityError (presumably until bug 1714354 is fixed).A simple webcompat intervention can fix this for now (at least I tested for
https://imgur.io/gallery/*
):try { window.caches.keys(); // fails in private browsing mode with a SecurityError, see bug 1714354 } catch (_) { Object.defineProperty(window.wrappedJSObject, "caches", { value: undefined, }); }
We can add this for both mobile and desktop, see more info below:
Most reports are from mobile (Firefox Focus / Nightly and Release in private mode) for the following urls:
https://m.imgur.com/ (for example, https://m.imgur.com/a/ABecAFx)
https://imgur.io/
I've also tried the same urls on desktop in a private window and https://imgur.io/ is broken, while https://m.imgur.com/a/ABecAFx is working (redirecting to https://imgur.com/a/ABecAFx)
Comment 1•2 years ago
|
||
It might be worth noting that I could turn the suggested intervention in bug 1742344 into a SmartBlock shim instead, if we'd like to keep anti-tracking related fixes more self-contained in SmartBlock. I'm already going to be making such shims for private browsing related to Firebase, so that might be a good idea.
Comment 2•2 years ago
|
||
This fix landed in https://phabricator.services.mozilla.com/D150034
Description
•