On 03/01/2011 13:59, Pavel Janík wrote:
> Hi,
> 
> ODF 1.2 spec says, that mimetype file SHALL be the first one in the ODT.

yes.
although there are some non-obvious subtleties:
- previously the requirement was SHOULD, but in 1.2 it is changed to SHALL
- actually in part3 the mimetype file is optional
  (i.e. package without mimetype is valid ODF 1.2 package,
  but if it has mimetype, then it must be first)
- but in part1 there is a requirement that ODF 1.2 documents
  SHALL have certain mimetypes, and in that case (if the document
  is the root document of an ODF package) the mimetype
  file SHALL contain that mimetype, so it is no longer optional

in summary:
an ODF 1.2 package that contains an ODF 1.2 root document but
does not contain a mimetype file, or where the mimetype file is not
the first file, is invalid.

> Why signed ODT documents do not have mimetype as the first file in  
> the ZIP? ;-)

did OOo write the file, and is it ODF 1.2?

that would sound like a bug to me...

> Why do we open such files when they are not correct ODT files?

good question.
OOo itself doesn't care for the mimetype file.
and it's not obvious to me how it could be a security problem if it is
missing?

i guess nobody thought it's worth the effort to detect it, or bother the
users with warnings...

-- 
"...the cost of adding a feature isn't just the time it takes to code it.
 The cost also includes the addition of an obstacle to future expansion.
 ... The trick is to pick the features that don't fight each other."
 -- John Carmack


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to