w3c / mediacapture-extensions

Extensions to Media Capture and Streams by the WebRTC Working Group
https://w3c.github.io/mediacapture-extensions/
Other
19 stars 14 forks source link

polling of getSettings() on a muted track reveals OS blur changes, correlating user across origins #90

Open jan-ivar opened 1 year ago

jan-ivar commented 1 year ago

The change of configuration steps say: "If track.muted is true, wait for track.muted to become false or track.readyState to be "ended"."

A note explains "these events are potentially triggered simultaneously on documents of different origins. User Agents MAY add fuzzing on the timing of events to avoid cross-origin activity correlation."

Unfortunately, mediacapture-main's steps to update [[Settings]] (scroll down a bit) have none of this, which seems like an inadvertent omission:

Problems with this:

  1. Privacy — JS can get the same information without the event through frequent polling of track.getSettings(), to correlate a user across origins.
  2. Consistency — two different queued tasks whose order is not specified are updating [[Settings]], which means one of them can accidentally thwart the other's attempt at detecting changes to [[Settings]].

We should: