Bug 486599

Summary: Cannot view bigger files handled by mozplugger (e.g. PDF)
Product: [Fedora] Fedora Reporter: Jan "Yenya" Kasprzak <kas>
Component: mozpluggerAssignee: Ngo Than <than>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: than
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-20 11:17:57 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jan "Yenya" Kasprzak 2009-02-20 10:08:41 EST
Description of problem:
Files larger than max. cache size with MIME types handled by mozplugger are handled incorrectly. Apparently mozplugger deletes the file even before a PDF (or whatever) viewer is started, and then runs the viewer with a no-longer-existent file name as an argument.

Version-Release number of selected component (if applicable):
firefox-3.0.6-1.fc10.x86_64 and also galeon-2.0.7-5.fc10.x86_64

How reproducible:
100 %

Steps to Reproduce:
1. verify that application/pdf MIME type is handled by mozplugger (about:plugins in Firefox).
2. find a large PDF file or lower the cache size (about:config - browser.cache.disk.capacity set e.g. to 100 from the original value of 50000).
3. click on a link to that PDF file (e.g The LaTeX Companion at http://www.tug.org/texlive/Contents/live/texmf-dist/doc/latex/base/tlc2.pdf)
Actual results:
evince window displaying an error message "No such file or directory" is displayed, "ps x|grep evince" displays something like

 8318 ?        Ss     0:00 mozplugger-helper 1304,1,10,111149062,0,0,1374,1015 evince "$file"
 8330 ?        Sl     0:00 evince /home/kas/.mozilla/firefox/0207oiki.default/Cache/4245AD24d01
 8335 pts/53   S+     0:00 grep evince

(and the file .../Cache/4245AD24d01 indeed does not exist).

Expected results:
The file should be displayed correctly, even if it is larger than a browser cache size (after all, it does not need to be part of the cache). Or at the very least a sane error message should be given to the user.

Additional info:
With "Cache-Control: no-store" HTTP header, the browser does not save the downloaded file to the cache, but instead to /tmp/plugtmp/plugin-...pdf,
which is then displayed correctly by evince. So at least webserver admins,
if not firefox users, have a workaround.

There is an upstream bug 195637, which has been filled in March, 2003, and has the last comment from January, 2004. It has a non-existent QA contact :-(

The use of a predictable name /tmp/plugtmp{-1,-2,...} for the temporary directory can be a security sensitive bug, but this has also been reported upstream as 164842 (reported in 2002, last comment from 2003, non-existent QA contact):
Comment 1 Ngo Than 2009-08-20 11:17:57 EDT
i cannot reproduce this issue with 1.12.1. The issue should be fixed in this new version
Comment 2 Jan "Yenya" Kasprzak 2009-08-20 11:51:03 EDT
Yep, it works for me now: