View Issue Details

IDProjectCategoryView StatusLast Update
0000235file[All Projects] Generalpublic2021-03-14 17:13
ReporterjschleusAssigned Tochristos 
PrioritylowSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.39 
Target VersionFixed in Version5.40 
Summary0000235: 5.39 reports "Certificate" instead of "ASCII text" for the PHP project NEWS file
Descriptionfile 5.39 (but not 5.38) reports incorrectly "Certificate" instead of "ASCII text" for the NEWS file of the PHP tarballs (e.g. viewable at https://raw.githubusercontent.com/php/php-src/master/NEWS).

Probably that is related to an addition in 5.39 to the file magic/Magdir/der (handling DER encoded files).

Unfortunately I'm not able to analyze the reason but just for curiosity I created some one-liner files starting with the first line of the mentioned NEWS file and got the following results
Additional InformationUnfortunately I'm not able to analyze the reason but just for curiosity I created some one-liner files starting with the first line of the mentioned NEWS file and got the following results:

"Certificate":
PHP NEWS
PHP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NEWS
PHP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
pHP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
pHp xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

"ASCII text":
PHA xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
php xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PHP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PHP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Unfortunately the text here seems not to use a monospaced font (e.g. the first two example lines have both 79 chars).
 
TagsNo tags attached.

Activities

jschleus

2021-02-08 15:26

reporter  

file-5.39_CERTIFICATE_bug.tests.txt (714 bytes)
"Certificate":
PHP                                                                        NEWS
PHP   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NEWS
PHP   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
pHP   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
pHp   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

"ASCII text":
PHA   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
php   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PHP  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PHP   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

christos

2021-02-24 22:52

manager   ~0003560

I can't reproduce this with the version from HEAD.

jschleus

2021-02-25 10:17

reporter   ~0003562

Hmm, I just compiled the GitHub R/O master version and could reproduce the described behavior.

Perhaps I have expressed myself somewhat imprecisely, for tests with the attached file you have to put only one of the given lines into a test file.

But file 5.38 outputs for the NEWS file of the originally mentioned URL "UTF-8 Unicode text", but for the NEWS file of the last PHP 8.0.2 release (https://raw.githubusercontent.com/php/php-src/PHP-8.0.2/NEWS) the mentioned "ASCII text". But the current file 5.39 and the HEAD version output both "Certificate".

By the way my tests are done under Linux openSUSE Leap 15.2.

christos

2021-03-14 17:13

manager   ~0003572

Fixed, thanks!

Issue History

Date Modified Username Field Change
2021-02-08 15:26 jschleus New Issue
2021-02-08 15:26 jschleus File Added: file-5.39_CERTIFICATE_bug.tests.txt
2021-02-24 22:51 christos Assigned To => christos
2021-02-24 22:51 christos Status new => assigned
2021-02-24 22:52 christos Status assigned => feedback
2021-02-24 22:52 christos Note Added: 0003560
2021-02-25 10:17 jschleus Note Added: 0003562
2021-02-25 10:17 jschleus Status feedback => assigned
2021-02-27 01:37 christos Status assigned => acknowledged
2021-03-14 17:13 christos Status acknowledged => resolved
2021-03-14 17:13 christos Resolution open => fixed
2021-03-14 17:13 christos Fixed in Version => 5.40
2021-03-14 17:13 christos Note Added: 0003572