focus-android icon indicating copy to clipboard operation
focus-android copied to clipboard

'Tracker blocked' toggle to OFF activates js when explicitly disabled

Open cutephoton opened this issue 5 years ago • 2 comments

Steps to reproduce

  1. Activate "block javascript' from settings screen
  2. Go to a webpage that uses javascript
  3. Toggle 'Trackers Blocked' to disabled state

Expected behavior

  • Javascript should remain disabled per user settings.

Actual behavior

  • Javascript is enabled.

Device information

  • Android device: BB Mobile Key2
  • Focus version: 8.0.25

cutephoton avatar Feb 14 '20 01:02 cutephoton

Ok, it's clear after looking at the source code that this is by design. But this is not intuitive. If I explicitly block javascript, it should never allow javascript.

https://github.com/mozilla-mobile/focus-android/blob/f5b22ff78fca22765b8b873b4f70693943ae559a/app/src/main/java/org/mozilla/focus/web/GeckoWebViewProvider.kt#L230-L241

Interestingly this behaviour is not consistent when navigating between pages that have been blocked and not blocked. So...

  • Visit Site A - Trackers Blocked -> Disabled (JS enabled)
  • Visit Site B - Trackers Blocked -> Enabled (JS disabled)
  • Go back to (or retype) Site A URL -> Disabled (JS disabled)
  • Refresh/Reload page -> Disabled (JS enabled)

cutephoton avatar Feb 14 '20 01:02 cutephoton

Ok so I know me and like maybe 3 other people wander the mobile internet without js. ;) Thought I'd follow up to report that JS can run when blocker is enabled (with javascript 'disabled'). Right now, I have a mix of active js and no-js pages with 'Trackers Blocked' enabled and javascript disabled.

This bug is half way to being a useful feature. Right now it's a buggy binary choice but that bugginess has me longing for a sliding scale of protection. I have some vague recollection that Tor's browser has some concept of this. Nevertheless, the way it is working today seems a bit more like a security problem than a feature.

cutephoton avatar May 10 '20 08:05 cutephoton

Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1802028

Change performed by the Move to Bugzilla add-on.

csadilek avatar Nov 22 '22 23:11 csadilek