[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-158.0a1-17.0-2] Bug 2100056 - Refresh sandbox RTP caller types after the fingerprinting...



Title: GitLab

brizental pushed to branch tor-browser-158.0a1-17.0-2 at The Tor Project / Applications / Tor Browser

Commits:

  • 152f8a04
    by Beatriz Rizental at 2026-12-03T16:55:33-03:00
    Bug 2100056 - Refresh sandbox RTP caller types after the fingerprinting protection overrides are updated. r?timhuang
    
    The nsContentUtils pref callback that refreshes sandboxes can run before
    nsRFPService parses the new overrides list, leaving sandboxes with a stale
    caller type.
    
    Differential Revision: https://phabricator.services.mozilla.com/D348202
    

2 changed files:

Changes:

  • toolkit/components/resistfingerprinting/nsRFPService.cpp
    ... ... @@ -441,6 +441,10 @@ void nsRFPService::PrefChanged(const char* aPref) {
    441 441
       if (pref.EqualsLiteral(RESIST_FINGERPRINTINGPROTECTION_OVERRIDE_PREF) ||
    
    442 442
           pref.EqualsLiteral(RESIST_FINGERPRINTINGPROTECTION_OVERRIDE_BASE_PREF)) {
    
    443 443
         UpdateFPPOverrideList();
    
    444
    +    // nsContentUtils' RFP pref callback may run before this one and see the
    
    445
    +    // stale override list, so refresh the sandboxes again now that it's
    
    446
    +    // updated.
    
    447
    +    xpc::RefreshSandboxesRTPCallerType();
    
    444 448
       } else if (pref.EqualsLiteral(GLEAN_DATA_SUBMISSION_PREF)) {
    
    445 449
         if (XRE_IsParentProcess() &&
    
    446 450
             !Preferences::GetBool(GLEAN_DATA_SUBMISSION_PREF, false)) {
    

  • toolkit/components/resistfingerprinting/tests/xpcshell/test_sandbox_reduce_timer_precision.js
    ... ... @@ -35,6 +35,8 @@ add_setup(() => {
    35 35
         );
    
    36 36
         Services.prefs.clearUserPref("privacy.resistFingerprinting.pbmode");
    
    37 37
         Services.prefs.clearUserPref("privacy.resistFingerprinting");
    
    38
    +    Services.prefs.clearUserPref("privacy.fingerprintingProtection");
    
    39
    +    Services.prefs.clearUserPref("privacy.fingerprintingProtection.overrides");
    
    38 40
       });
    
    39 41
     });
    
    40 42
     
    
    ... ... @@ -64,3 +66,26 @@ add_task(function test_disable_rfp_after_sandbox_creation() {
    64 66
         "Sandbox time is not rounded after disabling RFP"
    
    65 67
       );
    
    66 68
     });
    
    69
    +
    
    70
    +add_task(function test_enable_fpp_override_after_sandbox_creation() {
    
    71
    +  Services.prefs.setBoolPref("privacy.resistFingerprinting", false);
    
    72
    +  Services.prefs.setBoolPref("privacy.fingerprintingProtection", true);
    
    73
    +  Services.prefs.setStringPref(
    
    74
    +    "privacy.fingerprintingProtection.overrides",
    
    75
    +    "-ReduceTimerPrecision"
    
    76
    +  );
    
    77
    +  const sandbox = Cu.Sandbox("https://example.com");
    
    78
    +  Assert.ok(
    
    79
    +    !sandboxTimeIsRounded(sandbox),
    
    80
    +    "Sandbox time is not rounded without the ReduceTimerPrecision override"
    
    81
    +  );
    
    82
    +
    
    83
    +  Services.prefs.setStringPref(
    
    84
    +    "privacy.fingerprintingProtection.overrides",
    
    85
    +    "+ReduceTimerPrecision"
    
    86
    +  );
    
    87
    +  Assert.ok(
    
    88
    +    sandboxTimeIsRounded(sandbox),
    
    89
    +    "Sandbox time is rounded after enabling the ReduceTimerPrecision override"
    
    90
    +  );
    
    91
    +});

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx