Closed Bug 1537955 Opened 6 years ago Closed 5 years ago

privacy.resistFingerprinting option makes PDFs rendering blurred

Categories

(Firefox :: PDF Viewer, defect, P3)

66 Branch
defect

Tracking

()

VERIFIED FIXED
Firefox 70
Tracking Status
firefox-esr68 69+ fixed
firefox70 --- fixed

People

(Reporter: code, Assigned: tjr)

References

(Blocks 1 open bug)

Details

(Whiteboard: [tor][fingerprinting][fp-triaged])

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

  1. Use a high resolution (HiDPI) display
  2. Enable privacy.resistFingerprinting
  3. Load https://juliareda.eu/wp-content/uploads/2019/02/Copyright_Final_compromise.pdf

Actual results:

The PDF rendering is blurred to the point where it’s difficult to read the text.

Expected results:

Either Firefox should render the PDF with good quality, or failing that defer to another PDF reader.

Component: Untriaged → PDF Viewer

We seem to have a lot of burring bugs lately. Did something change to make the devicePixelRatio or whatever start causing this?

Has STR: --- → yes
Priority: -- → P3
Whiteboard: [tor][fingerprinting][fp-triaged]

@tjr: The bug is not new, I already reported that 1 year ago, you even participated to the discussion (https://bugzilla.mozilla.org/show_bug.cgi?id=1428331). What is likely changing the rate of reports is more and more HiDPI devices together with more and more RFP users.

should PDF.JS browser component be made privileged as a temporary solution?

I am not quite sure but this might be caused by spoofing the property window.devicePixelRatio.

Depends on: 1554751

pdfs should not have a way to exfiltrate the true device pixel ratio,
so it is safe to provide the correct value, enabling them to be rendered
correctly.

.

Assignee: nobody → tom
Keywords: checkin-needed
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/85385b4957e3
Do not spoof DevicePixelRatio for pdfs r=Ehsan

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70

Had someone test this for me and confirmed it worked.

Status: RESOLVED → VERIFIED

Comment on attachment 9081855 [details]
Bug 1537955 - Do not spoof DevicePixelRatio for pdfs

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Fix for Tor, who only uses ESR
  • User impact if declined: Tor will have to carry the patch
  • Fix Landed on Version: 70
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Only affects the Resist Fingerprinting mode; which is a non-default mode. Additionally, very small patch.
  • String or UUID changes made by this patch:
Attachment #9081855 - Flags: approval-mozilla-esr68?

[Tracking Requested - why for this release]: Patch for Tor

Comment on attachment 9081855 [details]
Bug 1537955 - Do not spoof DevicePixelRatio for pdfs

Fix for PDF rendering when resistFingerprinting is enabled (needed by Tor browser, off by default for Firefox). Approved for 68.1esr.

Attachment #9081855 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+

I’m still getting this issue on Firefox Nightly (currently 20190813, but haven’t seen it working since it landed), but not in default conditions: if I try in a clean profile it works, but in my existing profile PDFs are still blurred unless I disable RFP (so it’s not something else causing this by itself, but something that in conjunction with RFP makes this bugfix ineffective). Not sure what can be causing this, but if you could provide me some debugging instructions we might be able to pinpoint it.

(In reply to Bruno Pagani from comment #15)

I’m still getting this issue on Firefox Nightly (currently 20190813, but haven’t seen it working since it landed), but not in default conditions: if I try in a clean profile it works, but in my existing profile PDFs are still blurred unless I disable RFP (so it’s not something else causing this by itself, but something that in conjunction with RFP makes this bugfix ineffective). Not sure what can be causing this, but if you could provide me some debugging instructions we might be able to pinpoint it.

I cannot imagine anything about this patch that relies on your existing state. Weird! Have you changed any prefs beginning with 'pdfjs'? Tried new pdfs that wouldn't be cached?

No, they are no prefs beginning with pdfjs that don’t have their default value (they are many other prefs having non-default values though, if I get some time I could try to find if any particular one is causing this by bisecting).

And I’ve tried with random PDF on the web, same issue. Also note that toggling RFP and reload the PDF page gives a correct rendering, so I doubt this is a cache issue.

I'm still seeing this problem, on Mac OS 10.15 and Firefox 78.0.0.2 with a high-DPI monitor. Disabling privacy.resistFingerprinting fixed the blurry PDFs for me, yet this bugfix was integrated a long time ago. Maybe it missed some cases?

(In reply to Ben from comment #18)

I'm still seeing this problem, on Mac OS 10.15 and Firefox 78.0.0.2 with a high-DPI monitor. Disabling privacy.resistFingerprinting fixed the blurry PDFs for me, yet this bugfix was integrated a long time ago. Maybe it missed some cases?

Is it all PDF's Could you provide a link to an example?

Flags: needinfo?(firefoxbugs)

(In reply to Tom Ritter [:tjr] (OOTO until Aug 3) from comment #19)

Is it all PDF's Could you provide a link to an example?

It's the same for every PDF. All were blurry prior to disabling privacy.resistFingerprinting, and now all are sharp and clearer. n.b. All of the PDFs I've opened have looked fine in the default Mac PDF viewer app.

Flags: needinfo?(firefoxbugs)

Sorry, I forgot to mention what might be an important detail: My computer setup has two monitors, the main display being high-DPI, but the secondary one is standard DPI. All the Firefox windows are opened on the main monitor only.

FWIW, I’m still in the same status as above — working in clean profile, not in my current one —, but did not have time to debug this further. So there might still be some tricky behaviours there.

See Also: → 1582021
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: