[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Magic MIME

From: Juri Linkov
Subject: Re: Magic MIME
Date: Mon, 11 Feb 2008 22:55:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> not to fail trying to open it as an archive.  Archive files
>> have a well-known signature, and using content-based file
>> type recognition rather than filename-based is more reliable.
> C'mon Juri, you know better than that.  We've been through it with the
> image-recognition thingy, so it *should* be clear to everyone on this
> list now that content based recognition is no better than filename-based
> recognition (and vice versa).  We need to use both.

Yes, I remember what a mess was the recognition of image files.  But I think
that for other binary formats this could by simplified.  If, say, a file
doesn't start with the "0x8080ffff 0x0000081a" signature there is no sense
to try treating it as an arc archive even if it has the .arc extension.

IIRC, the decision for the image file extensions taking precedence over
the image file content was based solely on the security holes that some
image libraries reportedly have.  So that the user downloaded a .c file
somewhere from the Internet actually with an image inside should not take
the risk of opening it in image-mode in Emacs.

I don't know if such precautions are relevant for other binary formats
like archives.

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]