mozilla / doh-rollout

DEPRECATED - Add on for initial DoH rollout
Mozilla Public License 2.0
8 stars 4 forks source link

The "doh-rollout.self-enabled" pref is not removed after changing the "network.trr.mode" pref value via “about:preferences#networking” page #184

Closed SoftVision-CarmenFat closed 4 years ago

SoftVision-CarmenFat commented 5 years ago

[Affected Platforms]:

[Affected Versions]:

[Prerequisites]:

[Steps to reproduce]:

  1. Open the browser with the profile from prerequisites.
  2. Navigate to "about:preferences#networking" page.
  3. Click the "Settings" button and uncheck the "Enable DNS over HTTPS" checkbox.
  4. Click the "OK" button.
  5. Restart the browser.
  6. Observe if the "doh-rollout.self-enabled" preference is removed.

[Expected result]:

[Actual result]:

[Notes]:

self pref

maxxcrawford commented 5 years ago

This pref is cleared on the SECOND restart after user disabling DoH manually. This add-on only fires its main function (and makes changes) retroactively after Start Up/Network Change/doh-rollout.enabled pref update.

To make this more transparent, I've written out the chain of events that happen what a user manually disables DoH (via about:preferences), including expected prefs that should update/remain the same. Note that there are additional prefs being set (all under the doh-rollout. namespace) but the prefs outlined below are the ones that should be checked in this test case.

Step 1: First Run Start with a clean profile. Run add-on however you prefer. (Via flipping doh-rollout.enabled pref, or Normandy study.)

Expected Prefs:

Step 2: Update DoH via about:preferences _When a user unchecks DoH in about:preferences#networking, this triggers NO actions by the add-on immediately. The add-on only runs on browser startup, network change event (note the 60s timeout here) or when the doh-rollout.enabled pref is updated.

Expected Prefs:

Step 3: Restart/Network Change Addon detects that user pref has changed for network.trr.mode. Heuristics will be disabled and DoH is NOT enabled.

Expected Prefs:

Step 4: Restart/Network Change The add-on is now in its final disable loop, detecting/catching the doh-rollout.disable-heuristics pref. This logic will clear the doh-rollout.self-enabled pref and not run heuristics.

Expected Prefs:

maxxcrawford commented 5 years ago

However, I think we could safely clear this pref whenever rememberDisableHeuristics() is ran, to make the pref removed a step earlier.