developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 11 years ago

Closed 10 years ago

#1005 closed bug (fixed)

jForms: uploaded file's mimetype set by the browser may be wrong

Reported by: Julien Owned by: Julien
Priority: normal Milestone: Jelix 1.1.6
Component: jelix:forms Version: trunk
Severity: major Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

For some strange reason, my browser sends PDFs as application/binary instead of application/pdf, so MIME type verification against application/pdf declared in my form fails.

I suggest getting the MIME type only on the server side (as it could be forge on browser side).

Also, as mime_content_type() is marked as obsolete, I suggest providing a wrapper through jFile class (so we can use FileInfo for PHP 5.3 build).

Attachments (1)

1005-jForms-upload-mimetype-on-server-side.diff (1.7 KB) - added by Julien 11 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 11 years ago by Julien

  • review set to review?
  • Status changed from new to assigned

comment:2 Changed 10 years ago by laurentj

  • Milestone changed from Jelix 1.2 to Jelix 1.0.11
  • review changed from review? to review+

ok for me. Perhaps it is relevant to land this patch also in the 1.1.x branch (with the change of @since).

comment:3 Changed 10 years ago by Julien

  • Milestone changed from Jelix 1.0.11 to Jelix 1.1.6
  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.