Skip to content

Commit

Permalink
Updating patch for Firefox Nightly 53
Browse files Browse the repository at this point in the history
  • Loading branch information
plaperdr committed Nov 18, 2016
1 parent 24ad6e2 commit 0cbf07f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -4,7 +4,7 @@ Welcome to the official repository of FPRandom, a modified browser
whose goal is to counter advanced fingerprinting techniques!

### The browser
FPRandom is a modified version of Firefox 52, the latest Nightly version
FPRandom is a modified version of Firefox 53, the latest Nightly version
from Mozilla. FPRandom's primary goal is to break the stability and determinism
of very specific fingerprinting techniques while preserving the best user experience possible.
By introducing enough noise during the fingerprinting process, trackers are fooled and cannot bound
Expand All @@ -14,16 +14,16 @@ multiple sessions impossible.
###The patch
The **fprandom.patch** file contains the complete list of modifications brought
to Firefox. The patch is structured as follows:
* [From line 1 to 251](https://github.com/plaperdr/fprandom/blob/master/fprandom.patch#L1) -
* [From line 1 to 249](https://github.com/plaperdr/fprandom/blob/master/fprandom.patch#L1) -
addition of an entry in the **Privacy** section of Firefox preferences to chose
when the protection is activated ("Always", "Only in private windows" or "Never")
* [From line 252 to 351](https://github.com/plaperdr/fprandom/blob/master/fprandom.patch#L252) -
* [From line 250 to 348](https://github.com/plaperdr/fprandom/blob/master/fprandom.patch#L250) -
modification of the **Canvas API** to change the browser's fallback font and add imperceptible
variations to selected colors
* [From line 352 to 581](https://github.com/plaperdr/fprandom/blob/master/fprandom.patch#L352) -
* [From line 349 to 578](https://github.com/plaperdr/fprandom/blob/master/fprandom.patch#L349) -
modification of the **AudioContext API** to reduce the volume of random parts of
processed audio by a very small factor inaudible by the user
* [From line 582 to 644](https://github.com/plaperdr/fprandom/blob/master/fprandom.patch#L582) -
* [From line 579 to 641](https://github.com/plaperdr/fprandom/blob/master/fprandom.patch#L579) -
modification of the iterator of JavaScript objects to change the **enumeration order** of properties
and to prevent browser's unmasking

Expand Down
27 changes: 12 additions & 15 deletions fprandom.patch
@@ -1,7 +1,7 @@
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1109,9 +1109,12 @@ pref("services.sync.prefs.sync.privacy.c
@@ -1103,9 +1103,12 @@ pref("services.sync.prefs.sync.privacy.c
pref("services.sync.prefs.sync.privacy.clearOnShutdown.sessions", true);
pref("services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings", true);
pref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true);
Expand All @@ -14,7 +14,7 @@ diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
pref("services.sync.prefs.sync.security.OCSP.enabled", true);
pref("services.sync.prefs.sync.security.OCSP.require", true);
pref("services.sync.prefs.sync.security.default_personal_cert", true);
@@ -1413,8 +1416,10 @@ pref("media.gmp-provider.enabled", true)
@@ -1405,8 +1408,10 @@ pref("media.gmp-provider.enabled", true)

#ifdef NIGHTLY_BUILD
pref("privacy.trackingprotection.ui.enabled", true);
Expand Down Expand Up @@ -66,7 +66,7 @@ diff --git a/browser/components/preferences/in-content/privacy.js b/browser/comp
+ * Show the Fingerprinting Protection UI depending on the
+ * privacy.fingerprintingprotection.ui.enabled pref, and linkify its Learn More link
+ */
+ _initFingerprintingProtection: function () {
+ _initFingerprintingProtection: function() {
+ if (!Services.prefs.getBoolPref("privacy.fingerprintingprotection.ui.enabled")) {
+ return;
+ }
Expand All @@ -85,15 +85,15 @@ diff --git a/browser/components/preferences/in-content/privacy.js b/browser/comp
+ * Linkify the Learn More link of the Private Browsing Mode Fingerprinting
+ * Protection UI.
+ */
+ _initFingerprintingProtectionPBM: function () {
+ _initFingerprintingProtectionPBM: function() {
+ let link = document.getElementById("fingerprintingProtectionPBMLearnMore");
+ let url = "https://amiunique.org/faq";
+ link.setAttribute("href", url);
+ },
+ /**
* Initialize autocomplete to ensure prefs are in sync.
*/
_initAutocomplete: function () {
_initAutocomplete: function() {
@@ -131,6 +159,8 @@ var gPrivacyPane = {
this.initAutoStartPrivateBrowsingReverter();
this._initTrackingProtection();
Expand All @@ -111,8 +111,8 @@ diff --git a/browser/components/preferences/in-content/privacy.js b/browser/comp
+ gPrivacyPane.fingerprintingProtectionWritePrefs);
setEventListener("browserContainersCheckbox", "command",
gPrivacyPane._checkBrowserContainers);
},
@@ -224,6 +256,47 @@ var gPrivacyPane = {
setEventListener("browserContainersSettings", "command",
@@ -226,6 +258,45 @@ var gPrivacyPane = {
}
},

Expand All @@ -139,8 +139,6 @@ diff --git a/browser/components/preferences/in-content/privacy.js b/browser/comp
+ let enabledPref = document.getElementById("privacy.fingerprintingprotection.enabled");
+ let pbmPref = document.getElementById("privacy.fingerprintingprotection.pbmode.enabled");
+ let radiogroup = document.getElementById("fingerprintingProtectionRadioGroup");
+ console.log("INSIDE WRITE PREFS");
+ console.log(radiogroup.value);
+ switch (radiogroup.value) {
+ case "always":
+ enabledPref.value = true;
Expand Down Expand Up @@ -178,8 +176,8 @@ diff --git a/browser/components/preferences/in-content/privacy.xul b/browser/com
<!-- History -->
<preference id="places.history.enabled"
name="places.history.enabled"
@@ -294,3 +302,46 @@
accesskey="&browserContainersEnabled.accesskey;" />
@@ -306,3 +314,46 @@
</hbox>
</vbox>
</groupbox>
+
Expand Down Expand Up @@ -260,7 +258,7 @@ diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderin

#include "nsCSSParser.h"
#include "mozilla/css/StyleRule.h"
@@ -1105,6 +1106,24 @@ CanvasRenderingContext2D::WrapObject(JSC
@@ -1106,6 +1107,24 @@ CanvasRenderingContext2D::WrapObject(JSC
return CanvasRenderingContext2DBinding::Wrap(aCx, this, aGivenProto);
}

Expand All @@ -285,7 +283,7 @@ diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderin
bool
CanvasRenderingContext2D::ParseColor(const nsAString& aString,
nscolor* aColor)
@@ -1138,6 +1157,18 @@ CanvasRenderingContext2D::ParseColor(con
@@ -1139,6 +1158,18 @@ CanvasRenderingContext2D::ParseColor(con
value, presShell ? presShell->GetPresContext() : nullptr, parentContext,
*aColor);
}
Expand All @@ -304,7 +302,7 @@ diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderin
return true;
}

@@ -3531,12 +3562,43 @@ CanvasRenderingContext2D::TransformWillU
@@ -3557,12 +3588,42 @@ CanvasRenderingContext2D::TransformWillU
//
// text
//
Expand All @@ -330,7 +328,6 @@ diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderin
+ userfont.Append(end);
+
+ return userfont;
+
+}

void
Expand Down

0 comments on commit 0cbf07f

Please sign in to comment.