We're updating the issue view to help you get more done. 

cffile - mimetype of MS Office files incorrect in 5.2.2.71+

Description

Behaviour of <cffile action="upload" ...> appears to have changed in 5.2.2.71 which result in the contentsubtype getting reported incorrectly for all MS Office documents and potentially others.

Following are the results of some test done with two MS Word 2016 docx files, one with content and the other without. A simple reproduction test is attached.

On 5.2.1.9

  • Uploading a Word 2016 file with content:
    contentsubtype = vnd.openxmlformats-officedocument.wordprocessingml.document

  • Uploading a Word 2016 file without content
    contentsubtype = vnd.openxmlformats-officedocument.wordprocessingml.document

On 5.2.2.71 and up

Uploading a Word 2016 file with content
contentsubtype = x-tika-ooxml

Uploading a Word 2016 file without content
contentsubtype = octet-stream

Replication:

Isolated the issue to a simple form post with a cfml page to handle the form submit.

1 2 3 4 5 <!-- index.html --> <form id="frm-upload" name="frm-upload" enctype="multipart/form-data" action="index.cfm" method="post"> <input type="file" name="myfile" id="myfile"><br> <input type="submit" id="submit"> </form>
1 2 3 //index.cfm <cffile action="upload" filefield="form.myfile" result="fileResult" destination="#GetTempDirectory()#" nameconflict="makeunique"> <cfdump var="#fileResult#">

Test files (can't attach an empty docx):

Environment

Windows Server 2012
JDK 8

Status

Assignee

Michael Offner

Reporter

J R

Labels

None

Sprint

None

Fix versions

Affects versions

5.2.2.71

Priority

Blocker