Opened 5 years ago

Closed 5 years ago

#16781 closed defect (fixed)

Saving pdf files is not working in Tor Browser 5 using the built-in pdf viewer

Reported by: gk Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Keywords: tbb-5.0-regression, tbb-usability, TorBrowserTeam201508R
Cc: arthuredelstein Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I get greeted with

NS_ERROR_DOM_BAD_URI: Access to restricted URI denied NetUtil.jsm:383:0

if I click on the download button (next to the printer button) in the pdf viewer. Right-click and "Save page as..." is working

Child Tickets

Change History (6)

comment:1 Changed 5 years ago by gk

Cc: arthuredelstein added

I wonder if this is related to #15899.

comment:2 Changed 5 years ago by mcs

Keywords: TorBrowserTeam201508 added
Status: newneeds_review

Here is a patch:
https://gitweb.torproject.org/user/brade/tor-browser.git/commit/?h=bug16781-01&id=6803874c258b03f3fdd8cef519b6ef88185c54fa

Please review. We have this same patch in TB 4.5, but it was removed as part of #16429. Unfortunately, the code near this patch is independent of the original document; when it tries to call NetUtil.newChannel() the first party host info. is not available, so access to the blob URI is denied. There may be a better fix, but this solution will work for now (Arthur should take another look at this when he returns from vacation).

Last edited 5 years ago by mcs (previous) (diff)

comment:3 Changed 5 years ago by gk

Keywords: TorBrowserTeam201508R added; TorBrowserTeam201508 removed

comment:4 in reply to:  2 Changed 5 years ago by gk

Resolution: fixed
Status: needs_reviewclosed

Replying to mcs:

Here is a patch:
https://gitweb.torproject.org/user/brade/tor-browser.git/commit/?h=bug16781-01&id=6803874c258b03f3fdd8cef519b6ef88185c54fa

Please review. We have this same patch in TB 4.5, but it was removed as part of #16429. Unfortunately, the code near this patch is independent of the original document;

Yeah, this seems to be a common issue with pdf.js, see #15599 for another ticket impacted by that. Your patch looks good to me and I merged it to 5.5 with commit 6d15c68167a45cca12ab5e7bcb8781d1de535e80 and applied it to 5.0 (commit 45d52ca216b12a23e83b6fdc9edcff5f49c70152).

comment:5 Changed 5 years ago by mikeperry

Resolution: fixed
Status: closedreopened

We dropped this from 5.5a2 and 5.0.1 due to the urgency of the release. Reopening so we remember to re-merge this after Thursday's release.

comment:6 Changed 5 years ago by gk

Resolution: fixed
Status: reopenedclosed

This is commit d97c1f91bd955e6d7aa9bcb086fceb3d1edbcdf2 (tor-browser-38.2.1esr-5.5-2) and commit e1d7a8fe862d1e1c8f2707b6dc8d27cb65e7b4a2 (tor-browser-38.2.1esr-5.0.2) now.

Note: See TracTickets for help on using tickets.