View Issue Details

IDProjectCategoryView StatusLast Update
0000345fileGeneralpublic2022-06-01 12:05
ReporterAlmalixia Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status feedbackResolutionopen 
Summary0000345: mime_content_type result gets duplicated for xlsx
DescriptionWhen calling mime_content_type() on a file of type xlsx, it's returning 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheetapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet'.
Steps To Reproduceecho mime_content_type('file_name.xlsx');
TagsNo tags attached.

Activities

christos

2022-05-21 22:30

manager   ~0003745

I don't maintain the php bindings for libmagic; I just tried it on my machine and it works:
[6:09pm] 370>php
<?php
echo mime_content_type('foo.xlsx') . "\n";
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

[6:10pm] 371>php -v
PHP 7.4.27 (cli) (built: Apr 25 2022 13:02:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

jeremysawesome

2022-05-26 22:44

reporter   ~0003749

Performed similar steps on my machine:
```
[jdev@dev-01 ~]$ php -r 'echo mime_content_type("Foo.xlsx")."\n";'
application/vnd.openxmlformats-officedocument.spreadsheetml.sheetapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
[jdev@dev-01 ~]$ php -v
PHP 7.4.28 (cli) (built: Feb 15 2022 13:23:10) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
    with Xdebug v2.9.6, Copyright (c) 2002-2020, by Derick Rethans
```

@christos - is this the expected output? And, is this the correct place to report these errors? If this is not the correct place to report these errors, where would the correct place be?

Thanks!

christos

2022-06-01 12:05

manager   ~0003756

I think that the PHP bug tracker would be a more appropriate place.

Issue History

Date Modified Username Field Change
2022-05-12 18:20 Almalixia New Issue
2022-05-21 22:30 christos Assigned To => christos
2022-05-21 22:30 christos Status new => feedback
2022-05-21 22:30 christos Note Added: 0003745
2022-05-26 22:44 jeremysawesome Note Added: 0003749
2022-06-01 12:05 christos Note Added: 0003756