Clayton wrote:
Sebastien Lanteigne wrote:
Hi,
An otx is really just a glorified zip file.
However I was wrong in my last message
It's not
application/x-zip
but
application/zip
Here is the explanation from mediawiki
''Note that the MIME type of some file formats may be detected too
broadly - any XML-based format may show up as text/xml, any ZIP-based
format as application/zip, etc. Consequently, the file extensions for
such formats must be associated with the broader MIME type, e.g.:
text/xml xml xsl xslt rss rdf
application/zip zip jar xpi sxc stc sxd std sxi sti sxm stm
sxw stw odt ott oth odm odg otg odp otp ods ots odc odf odb odi oxt
application/msword doc xls ppt''
OK, I've tinkered with this a bit more... by adding OXT ot the
application/zip mime type, we get past the corrupt file error message
and on to a completely now one... the fact that zip files are explicitly
blocked from MediaWiki by default because of a potential exploit:
===================
# A ZIP file may be a valid Java archive containing an applet which
exploits the
# same-origin policy to steal cookies
===================
I can disable mime type checking altogether, but... that's not really a
good idea as it opens up a hole for exploits (from what I've read). I
can disable zip checking.. again, opening up a hole for exploits.
The MediaWiki guys have mentioned that this is likely related to a known
bug in MediaWiki with docx etc files:
https://bugzilla.wikimedia.org/show_bug.cgi?id=18684
Other suggestions were the same as here.. try adding OXT to
application/zip to see if that works, or fox the mime type in the file
itself (but no tips on how to do this). The discussion is still
on-going there. This might lead to a new bug report for the MedaiWiki
guys :-)
C.
FYI, I tried uploading a "real" .oxt file: an example from [1]. It
uploaded just fine. Solving the problem of creating a real .oxt may
therefore solve the upload problem, too.
The wiki contains a wealth of information about extensions; everything
except how to create the file from scratch. Perhaps Mba (who wrote most
of it) could be induced to add that information.
[1] http://wiki.services.openoffice.org/wiki/Non-code_extensions
The file I uploaded was the TemplatePackage.oxt, from the Example section.
--
/tj/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]