duckduckgo-privacy-extension icon indicating copy to clipboard operation
duckduckgo-privacy-extension copied to clipboard

This addon breaks xterm.js fonts

Open ngaro opened this issue 2 years ago • 10 comments

Description

All sites that use xterm.js show a "broken" version of the fonts.

Steps to Reproduce

  1. Surf to https://xtermjs.org/ to see the broken fonts
  2. Disable this addon
  3. See how the fonts should look

Versions

  • Extension: 2021.9.2
  • Browser: Firefox 92.0
  • OS: Mint 20.2

Once the fonts look fine again, you can usually enable the addon again without reintroducing the problem.

ngaro avatar Sep 11 '21 14:09 ngaro

Thanks for reporting! I followed the steps that you outlined and I wasn't able to reproduce (same extension version, same FF version, but on MacOS) 🤔 This may have something to do with our canvas protection, but I'll need more reliable repro case to investigate. Also, can you please share the screanshot of broken fonts?

@jonathanKingston can you please double-check on Linux?

kdzwinel avatar Sep 17 '21 10:09 kdzwinel

Results on the xterm.js site with addon enabled: privacyaddonenabled and disabled: privacyaddondisabled

ngaro avatar Sep 17 '21 11:09 ngaro

PS: If you don't have a Mint 20.2 nearby, it is based on Ubuntu 20.4. I assume it will have the same problem

ngaro avatar Sep 17 '21 12:09 ngaro

I have Ubuntu 20.4 with various Firefox installs and can't reproduce.

I can't see the code doing any font sizing via Canvas, which leads me to think this is either:

  • A different set of system fonts
  • Firefox doing some weird rendering that might be fixed by a reload?

Is the problem still reproducible for you @ngaro?

jonathanKingston avatar Sep 27 '21 16:09 jonathanKingston

Yes, now I also reproduced it in a VM at the obfuscated link below:

Start with "https" follow it by a colon and 2 slashes, follow it by "login-cmt.uantwerpen.COUNTRYCODEOFBELGIUM/vmmintddg831.ova" and replace COUNTRYCODEOFBELGIUM by the correct one. It's a large download (almost 3GB) so won't keep it online forever.

ngaro avatar Sep 28 '21 15:09 ngaro

Sorry, I just noticed that i gave the file wrong permissions, download should work now

ngaro avatar Sep 29 '21 13:09 ngaro

Hello, I would like to point out this issue also affects the Home Assistant SSH terminal web ui add on

See github issue https://github.com/home-assistant/addons/issues/2214

This probably breaks other things too, only current solution is to disable the duck duck go plugin

Note, I don't have this problem on https://xtermjs.org/

I have right now the plugin enabled

This is https://xtermjs.org/ image

And here is my home assistant image

shodanx2 avatar Oct 03 '21 20:10 shodanx2

Hello, I would like to point out this issue also affects the Home Assistant SSH terminal web ui add on

See github issue home-assistant/addons#2214

This probably breaks other things too, only current solution is to disable the duck duck go plugin

Note, I don't have this problem on xtermjs.org

I have right now the plugin enabled

This is xtermjs.org image

And here is my home assistant image

same problem here, but with ttyd instead of home assistant (home assistant uses ttyd). same goes for xterm.js - it works fine there

Progams:

  • VSCode web: problems
  • ttyd: problems
  • portainer: works fine
  • jupyterlab: works fine
  • coderpad: works fine
  • xtermjs.org: works fine

after whitelisting the sites in the add-on settings, they work fine

GGORG0 avatar Oct 17 '21 10:10 GGORG0

I suspect this is the fingerprint randomisation with their glyph sizing code: https://github.com/xtermjs/xterm.js/blob/569708677fab0b46689bb6cbff9ce7dfce20c38d/src/browser/renderer/CustomGlyphs.ts

It's likely it isn't consistent with which domains we cause this issue to as the browser uses different keys per user to generate this.

We have some carve outs on these protections however it looks like they're drawing bezier curves and other things that would trigger our protections.

One area we could exclude is the check for transparency here: https://github.com/xtermjs/xterm.js/blob/376b29673ba174934b1b6339ef3eed8449fec529/src/browser/ColorManager.ts#L167-L193

However we could be breaking https://github.com/xtermjs/xterm.js/blob/7bd7967ab7c61e544c597e6e1b4fdfc2ee7f73e0/addons/xterm-addon-webgl/src/atlas/WebglCharAtlas.ts#L408-L413 also and I can't see how we'd exclude this.

jonathanKingston avatar Oct 17 '21 13:10 jonathanKingston

As a temporary fix, could it be possible to set an exception for DDGPE to not run at all on the following ?

http://homeassistant.lan https://homeassistant.lan http://homeassistant.lan:8123 https://homeassistant.lan:8123

shodanx2 avatar Oct 18 '21 05:10 shodanx2