[OTHER] dom.webserial.enabled (unintentionally) locked to false #312
Labels
No labels
bug
confirmed
contribution welcome
duplicate
enhancement
good first issue
help wanted
important
invalid
other
question
upstream
web compat
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
celenity/Phoenix#312
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
// Toggling 'dom.webserial.enabled' itself could be fingerprintable, but setting these instead just causes the permission to be automatically denieddefaultPref("dom.webserial.gated", true); // [DEFAULT]defaultPref("permissions.default.serial", 2); // [HIDDEN]the implication here is not entirely correct: if any policies are defined (as they are in phoenix, shipping its own
policies.json),dom.webserial.enabledis locked to false*. if fingerprinting truly is a concern, with the webserial api turned on by default in desktop release builds, or the api support is intended to be left user-modifiable by default (akadefaultPrefinstead oflockPref),DefaultSerialGuardSetting: 3should be set as policy, which would ironically allow the api by default (dom.webserial.enabled->true), and then it would be gated by abovementioned prefs. the policy should not be set on android, sincefalseis the default on mobile and should not be overridden; the value being locked tofalseby policy usage is not an issue there (that is, until the default changes totrueeverywhere).*EDIT:
in ff152+, the pref might no longer be locked to false by policy usage, just default
falsein that case (it is locked in 151); the fingerprinting angle remains the same. so for 152, explicitly settingdefaultPref("dom.webserial.enabled", true); // [NO-ANDROID] [DEFAULT]might be enough.@degausser Thank you for letting me know! I'm surprised by this behavior, this was definitely something I missed.
Yeah, the intention is basically to disable/block usage of the API by default, while allowing users to override/re-enable it if desired.
The problem with setting
dom.webserial.enabledtofalsedirectly is that it's fingerprintable (outside of Android currently), due to it impacting theDOM(as it controls the exposure of ex.SerialandSerialPort) - so it adds an extra vector for us to stand out from stock Firefox. As long asdom.webserial.gatedis set totrue(Maybe we should lock that pref, TBH?), settingpermissions.default.serialto2effectively achieves the same result, just without impacting theDOM(and thus minimizing the impact on fingerprinting).Unfortunately, I don't think it will be - IIRC, based on testing in the past, prefs set by policies seem to take priority over prefs set by us (at
phoenix.cfg), will test to confirm this is still the case though.It's annoying how this is handled, wish there was a way we could avoid setting it at all via policies, but it seems to be hardcoded. So I think the best solution for now will be your idea of setting
DefaultSerialGuardSettingto3for desktop. Will add for next release!