[dokuwiki] NEW PLUGIN: archive upload

  • From: Michael Klier <chi@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 16 Jan 2008 00:12:07 +0100

Hi everyone,

I've created a plugin that makes use of the recently added MEDIA_UPLOAD_FINISH
hook. It allows you upload archives and, if you check a checkbox in the upload
form, automatically extracts the files, keeping the directory structure of the
archive.

The plugin is capable of santitizing the file/directory names, like DokuWiki
does, and also performs all the mime-type and security checks (this is done by
extracting the archive to a temporary directory first). All un-allowed files
and directory left overs are automatically removed too, so there shouldn't be
anything suspicious left. It also sends a notification mail for every
extracted file, though I am thinking about sending just one mail instead.

So far it works for the .zip .tgz .tar .tar.gz (I am still working on bz2).
ATM the plugin is "almost" finished (or in a rather raw state). That's why I
am sending it to the list before I release it to the public.

I'd be happy about some feedback, and testers. I've tested it so far only
under Linux (Apache2/PHP 5.2.0.x), maybe someone could give it shot under a
Windows environment.

The plugin itself is attached to this mail (of course you need a recent
development Version to test it).

Happy wikiing!
    Chi

-- 
Michael Klier

mail:   chi@xxxxxxxxxxx
www:    http://www.chimeric.de
icq:    206179334
jabber: chi@xxxxxxxxxxxxxxxxxx
key:    http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551

Other related posts: