kkapsner / CanvasBlocker

A Firefox extension to protect from being fingerprinted.
https://canvasblocker.kkapsner.de
Mozilla Public License 2.0
1.16k stars 87 forks source link

chokes on OTRS popup close #264

Closed grinapo closed 6 years ago

grinapo commented 6 years ago

OTRS (opensource ticketing system) opens a popup for adding info to a ticket, then closes the window and notifies back the main window. Except under CB it fails reliably, since it seems that 10:58:57.993 [CanvasBlocker] frame script: [2018-09-17 10:58:57.994] Dynamic content script was too late to provide settings.

Interestingly this message is not visible in notification or verbose level logging.

10:57:04.347 [CanvasBlocker] frame script: [2018-09-17 10:57:04.347] settings changed 
Object { persistentIncognitoRndStorage: {…} }
logging.js:68:5
10:57:04.362
GEThttps://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=10822975;ArticleID=12872255
[HTTP/2.0 200 OK 717ms]
10:57:05.162 [CanvasBlocker] frame script: [2018-09-17 10:57:05.127] starting https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=10822975;ArticleID=12872255 logging.js:68:5
10:57:05.162 [CanvasBlocker] frame script: [2018-09-17 10:57:05.127] open port to background script logging.js:68:5
10:57:05.162 [CanvasBlocker] frame script: [2018-09-17 10:57:05.128] Is top level window -> tab had navigation -> clear page action logging.js:68:5
10:57:05.162 [CanvasBlocker] frame script: [2018-09-17 10:57:05.128] register listener for messages from background script logging.js:68:5
10:57:05.163 [CanvasBlocker] frame script: [2018-09-17 10:57:05.128] intercepting window 
Window https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=10822975;ArticleID=12872255
logging.js:68:5
10:57:05.163 [CanvasBlocker] frame script: [2018-09-17 10:57:05.128] settings not loaded -> need to pre intercept logging.js:68:5
10:57:05.164 [CanvasBlocker] frame script: [2018-09-17 10:57:05.131] prepare to intercept (i)frames. logging.js:68:5
10:57:05.164 [CanvasBlocker] frame script: [2018-09-17 10:57:05.152] force load the settings. Calling stack: preIntercept/doPreIntercept/</<.get<@moz-extension://901278c4-f647-4847-93a7-802443faefa6/lib/intercept.js:112:71
trapInstanceMethod@https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=10822975;ArticleID=12872255:212:1
@https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=10822975;ArticleID=12872255:268:5
@https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=10822975;ArticleID=12872255:1:2
logging.js:68:5
10:57:05.164 [CanvasBlocker] frame script: [2018-09-17 10:57:05.153] Starting synchronous request to wait for settings. logging.js:68:5
10:57:05.164 [CanvasBlocker] frame script: [2018-09-17 10:57:05.154] Got data from port 
Object { tabId: 228, persistentRnd: {}, persistentIncognitoRnd: {} }
logging.js:68:5
10:57:05.166 [CanvasBlocker] frame script: [2018-09-17 10:57:05.154] my tab id is 228 logging.js:68:5
10:57:05.166 [CanvasBlocker] frame script: [2018-09-17 10:57:05.154] got persistent random data 
Object {  }
logging.js:68:5
10:57:05.166 [CanvasBlocker] frame script: [2018-09-17 10:57:05.155] settings loaded logging.js:68:5
10:57:05.166 [CanvasBlocker] frame script: [2018-09-17 10:57:05.157] check url https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=10822975;ArticleID=12872255 for block mode fakeReadout logging.js:68:5
10:57:05.167 [CanvasBlocker] frame script: [2018-09-17 10:57:05.158] Initialized settings by dynamic content script. logging.js:68:5
10:57:05.201
GEThttps://ticket.wikimedia.org/otrs-web/skins/Agent/default/css-cache/CommonCSS_fe73ed8deccc7aa10d86c8df90dc74a9.css
[HTTP/2.0 200 OK 202ms]
10:57:05.201
GEThttps://ticket.wikimedia.org/otrs-web/skins/Agent/slim/css-cache/CommonCSS_019cdb54170737412da900c9152a88eb.css
[HTTP/2.0 200 OK 203ms]
10:57:05.201
GEThttps://ticket.wikimedia.org/otrs-web/skins/Agent/default/css-cache/ModuleCSS_6f4f4558d28b25de687567fb73ab548e.css
[HTTP/2.0 200 OK 204ms]
10:57:05.201
GEThttps://ticket.wikimedia.org/otrs-web/skins/Agent/default/css/thirdparty/ui-theme/jquery-ui.css
[HTTP/2.0 200 OK 201ms]
10:57:05.201
GEThttps://ticket.wikimedia.org/otrs-web/js/js-cache/CommonJS_2f303466979dc16caa00d61c67662d35.js
[HTTP/2.0 200 OK 235ms]
10:57:05.201
GEThttps://ticket.wikimedia.org/otrs-web/js/js-cache/ModuleJS_c6c061924e7ccb266d9f3aff4c09b41b.js
[HTTP/2.0 200 OK 242ms]
10:57:05.209 [CanvasBlocker] frame script: [2018-09-17 10:57:05.209] settings still default? false

Description

So when the popup closes CB blocks the method to give control back to the main window. The result is that the main window waits forever for the popup to say "I'm closing".

Also, the logging acting weird.

Steps to Reproduce (for bugs)

  1. Go to any recent OTRS system [possibly there are demo systems out there, too]
  2. Add a note to any ticket (popup opens).
  3. Finish the note (popup closes)
  4. The main window should jump to the ticket instead of waiting forever.

Your Environment

Your Settings

Default as far a I know. (apart from the loglevel)

kkapsner commented 6 years ago

Did you activate the window API protection? Otherwise I cannot reproduce your problem. It is known that the window API protection may break some sites - that's why it's not enabled by default. You have to add a site specific value for your OTRS system to disable the window API protection there: grafik

grinapo commented 6 years ago

@kkapsner No, it is off. So you suggest it may be possible that CB clashes with some other addons? I cannot promise to start permutating them right now, so if debug would help I'd appreciate its shorter path. :-)

kkapsner commented 6 years ago

The message in the log is a little bit weird but nothing to worry about. I think it's because you're using nightly.

kkapsner commented 6 years ago

No, it is off.

Well that's weird. Please try with a fresh profile.

kkapsner commented 6 years ago

Please retest with 0.5.4: https://github.com/kkapsner/CanvasBlocker/releases/tag/0.5.4

kkapsner commented 6 years ago

Is the problem still present?

kkapsner commented 6 years ago

No respone = I assume the problem is solved.