embedding pdfs fail for some users using Firefox

Bug #1249166 reported by Robert Lyon on 2013-11-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

This looks to be related to mimetypes that handle pdfs

The default mimetype, Portable Document Format (PDF) is:


However users are able to upload pdfs that end up with all manner of mimetypes, following is a list of saved mimetypes where the oldextention was 'pdf':


Some of them may simply be people putting wrong extension on their non .pdf file but the majority will be misdiagnosed pdfs.

This is probably due to the php finfo function not being able to check correctly
so Mahara is going by what the browser tells it and by looking at the list browsers lie.

An example why browsers may be giving wrong info:

The application/force-download content-type is from a user action.
The user opened an URL that used this content-type to be sure that the browser displayed a file download dialog instead of displaying it inline with a PDF plugin. The user selected "save this decision" and the wrong content-type was saved in mimetypes.rdf.

so the question is what to do?

Robert Lyon (robertl-9) on 2013-11-08
Changed in mahara:
status: New → Confirmed
Robert Lyon (robertl-9) wrote :

I should mention that list of dud pdf mimetypes is from mahara.org - 4% of the pdf files there have the wrong mimetype recorded against them. So the problem is bigger than one person/isolated case but not too huge an issue

Aaron Wells (u-aaronw) wrote :

I've opened a separate bug to talk about the issue of mimetype detection generally: https://bugs.launchpad.net/mahara/+bug/1249858

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers