Bug #77784 [Com]: mime_content_type result gets doubled for xlsx

From: Date: Thu, 14 May 2020 09:13:11 +0000
Subject: Bug #77784 [Com]: mime_content_type result gets doubled for xlsx
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227032@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77784&edit=1

 ID:                 77784
 Comment by:         michael at roth dot red
 Reported by:        dpoddubny at gmail dot com
 Summary:            mime_content_type result gets doubled for xlsx
 Status:             Verified
 Type:               Bug
 Package:            Filesystem function related
 Operating System:   linux
 PHP Version:        7.3.3
 Block user comment: N
 Private report:     N

 New Comment:

I got the same issue with finfo(FILEINFO_MIME_TYPE, $file) in php 7.4.5 on linux


Previous Comments:
------------------------------------------------------------------------
[2020-05-13 20:24:41] oziranhua at instructure dot com

This also is affecting word documents.

Tested with:
- MAC OS 10.15.4/ PHP 7.3.4
- Ubuntu 16.04.6 LTS / PHP 7.3.13
- Ubuntu 16.04.6 LTS / PHP 7.3.14


$ file --mime-type test.docx
test.docx: application/vnd.openxmlformats-officedocument.wordprocessingml.document
$ php -a
Interactive shell

php > print mime_content_type('./test.docx');
application/vnd.openxmlformats-officedocument.wordprocessingml.documentapplication/vnd.openxmlformats-officedocument.wordprocessingml.document

------------------------------------------------------------------------
[2020-04-28 23:33:52] requinix@php.net

Related To: Bug #79534

------------------------------------------------------------------------
[2020-03-26 12:45:11] willem at soomedia dot nl

I'm experiencing the same issue in my Docker container with PHP version 7.3.11.

------------------------------------------------------------------------
[2020-03-13 10:26:15] mcorteel at yahoo dot fr

Same problem with LibreOffice 6.0.7.3 and PHP 7.4.2.
Mimetype:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheetapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet

------------------------------------------------------------------------
[2020-01-07 14:54:44] albsmul at gmail dot com

Same problem with php 7.4.1 and a Word docx file (libmagic 537) - mime_content_type returns
"application/vnd.openxmlformats-officedocument.wordprocessingml.documentapplication/vnd.openxmlformats-officedocument.wordprocessingml.document"

Worked well on old php 5.6.26 (libmagic 517)

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=77784


--
Edit this bug report at https://bugs.php.net/bug.php?id=77784&edit=1


Thread (18 messages)

« previous php.bugs (#227032) next »