View Issue Details

IDProjectCategoryView StatusLast Update
0000456fileGeneralpublic2023-06-16 19:38
ReporterAlbrecht Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSDebianOS VersionBookworm
Product Version5.44 
Fixed in Version5.45 
Summary0000456: LRZip: wrong MIME type
DescriptionFor the attached LRZip sample, the human-readable message is correct:

$ file sample.lrz
sample.lrz: LRZIP compressed data - version 0.6

…but the MIME type is not – expected is “application/x-lrzip”:

$ file --mime-type sample.lrz
sample.lrz: application/octet-stream
Steps To ReproduceSee above.
Additional InformationI think the effect is caused by a bad order of statements in the file magic/Magdir/compress, at least the attached patch seems to fix the issue. No idea if it has any adverse effects, though.
Tagspatch

Activities

Albrecht

2023-06-05 16:52

reporter  

sample.lrz (81 bytes)
lrzip-mime.patch (527 bytes)   
--- magic/Magdir/compress.orig	2023-06-05 15:29:45.632941678 +0200
+++ magic/Magdir/compress	2023-06-05 15:30:10.932941463 +0200
@@ -288,10 +288,10 @@
 
 # https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt
 0	string		LRZI			LRZIP compressed data
+!:mime  application/x-lrzip
 >4	byte		x			- version %d
 >5	byte		x			\b.%d
 >22	byte		1			\b, encrypted
-!:mime	application/x-lrzip
 
 # https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html
 0	lelong		0x184d2204	LZ4 compressed data (v1.4+)
lrzip-mime.patch (527 bytes)   

christos

2023-06-16 19:38

manager   ~0003948

Committed, thanks!

Issue History

Date Modified Username Field Change
2023-06-05 16:52 Albrecht New Issue
2023-06-05 16:52 Albrecht Tag Attached: patch
2023-06-05 16:52 Albrecht File Added: sample.lrz
2023-06-05 16:52 Albrecht File Added: lrzip-mime.patch
2023-06-16 19:37 christos Assigned To => christos
2023-06-16 19:37 christos Status new => assigned
2023-06-16 19:38 christos Status assigned => resolved
2023-06-16 19:38 christos Resolution open => fixed
2023-06-16 19:38 christos Fixed in Version => 5.45
2023-06-16 19:38 christos Note Added: 0003948