Skip to content

Commit

Permalink
Release 65.0.3325.190
Browse files Browse the repository at this point in the history
  • Loading branch information
csagan5 committed Mar 26, 2018
1 parent 4029e88 commit 8b49426
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 168 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 65.0.3325.190
* block some Canvas and AudioBuffer APIs mostly used for fingerprinting
* updated adblock filters

# 65.0.3325.176
* block plugins enumeration API
* block battery API
Expand Down
67 changes: 67 additions & 0 deletions patches/BRM042_Canvas-fingerprinting-mitigations-via-IDL.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sat, 24 Mar 2018 05:18:03 +0100
Subject: Canvas: fingerprinting mitigations via IDL

Disable toDataURL, toBlob, getImageData and webGL renderering info
---
third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.idl | 4 ++--
.../Source/modules/canvas/canvas2d/CanvasRenderingContext2D.idl | 4 ++--
third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.idl b/third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.idl
--- a/third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.idl
+++ b/third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.idl
@@ -36,9 +36,9 @@ interface HTMLCanvasElement : HTMLElement
// Note: The arguments argument is variadic in the spec, but not here as
// only one extra argument is actually used.
// FIXME: type should not have a default value.
- [MeasureAs=CanvasToDataURL, RaisesException] DOMString toDataURL(optional DOMString type = null, optional any arguments);
+ //[MeasureAs=CanvasToDataURL, RaisesException] DOMString toDataURL(optional DOMString type = null, optional any arguments);

- [MeasureAs=CanvasToBlob, RaisesException] void toBlob(BlobCallback _callback, optional DOMString type = null, optional any arguments);
+ //[MeasureAs=CanvasToBlob, RaisesException] void toBlob(BlobCallback _callback, optional DOMString type = null, optional any arguments);
};

// https://html.spec.whatwg.org/multipage/canvas.html#blobcallback
diff --git a/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.idl b/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.idl
--- a/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.idl
+++ b/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.idl
@@ -110,7 +110,7 @@ interface CanvasRenderingContext2D {
// text (see also the CanvasDrawingStyles interface)
void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
- TextMetrics measureText(DOMString text);
+ //TextMetrics measureText(DOMString text);

// drawing images
[CallWith=ScriptState, RaisesException] void drawImage(CanvasImageSource image, unrestricted double x, unrestricted double y);
@@ -125,7 +125,7 @@ interface CanvasRenderingContext2D {
// pixel manipulation
[RaisesException] ImageData createImageData(ImageData imagedata);
[RaisesException] ImageData createImageData(long sw, long sh);
- [RaisesException] ImageData getImageData(long sx, long sy, long sw, long sh);
+ //[RaisesException] ImageData getImageData(long sx, long sy, long sw, long sh);
[RaisesException] void putImageData(ImageData imagedata, long dx, long dy);
[RaisesException] void putImageData(ImageData imagedata, long dx, long dy, long dirtyX, long dirtyY, long dirtyWidth, long dirtyHeight);

diff --git a/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp b/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp
--- a/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp
@@ -37,11 +37,11 @@ WebGLExtensionName WebGLDebugRendererInfo::GetName() const {

WebGLDebugRendererInfo* WebGLDebugRendererInfo::Create(
WebGLRenderingContextBase* context) {
- return new WebGLDebugRendererInfo(context);
+ return nullptr;
}

bool WebGLDebugRendererInfo::Supported(WebGLRenderingContextBase*) {
- return true;
+ return false;
}

const char* WebGLDebugRendererInfo::ExtensionName() {
--
2.7.4

168 changes: 0 additions & 168 deletions patches/BRM042_Canvas-fingerprinting-mitigations.patch

This file was deleted.

0 comments on commit 8b49426

Please sign in to comment.