By default in upload module settings available next file extensions: jpg jpeg gif png txt html doc xls pdf ppt pps.

For office suits it means what only Microsoft Office documents (doc and xls) may be uploaded without additional tuning of the module settings. But OpenOffice (and StarOffice) now widely spreaded multiplatform applications and I think they must be presented too. Full list of extensions used in OpenOffice are below:

Application File extension
OpenOffice.org Writer *.sxw
OpenOffice.org Writer templates *.stw
OpenOffice.org Calc *.sxc
OpenOffice.org Calc templates *.stc
OpenOffice.org Impress *.sxi
OpenOffice.org Impress templates *.sti
OpenOffice.org Draw *.sxd
OpenOffice.org Draw templates *.std
OpenOffice.org Math *.sxm
Master documents *.sxg

Also I think most commonly used archive formats must be presented by default. Like tar, gzip, bzip2, zip, arj and rar. They not OS specific and used as in various unix-systems and on mac and windows too.

I think default extensions list must looks like:
jpg jpeg gif png txt html sxg sxc sxm sxi sxw doc xls pdf ppt pps tar tar.gz tar.bz2 tgz tbz2 zip arj rar

It simple change in code, but I think it bring some economy of time for site developers.

CommentFileSizeAuthor
upload-extensions.patch1.68 KBaxel

Comments

axel’s picture

Status: Active » Needs review
killes@www.drop.org’s picture

With such a long list of allowed extensions we should consider to change to a blacklist instead of a whitelist.

axel’s picture

Reasonable idea. Drupal then may offer predefined list of potentially dangerous extensions ...but I think it will not smaller than list above. May be best way to offer both lists - whitelist and blacklist?

Anyway, if MS Office extensions presented in current list, I think OpenOffice extensions also must be presented. Else, why such preferablness for only one office suite?

Crell’s picture

If we're adding more whitelist extensions, then we may as well accept the OpenDocument formats now as well as the older OOo 1.x formats. (The OpenDoc extensions are different.)

Personally I'd much rather see a big whitelist than a blacklist, period. Blacklist means default-allow, which should be avoided whenever possible. Default-deny, even if the accepted list is long, is more secure.

drumm’s picture

Status: Needs review » Needs work

What are the new OpenDoc extensions?

Adding Office-equivalent extensions is a simple task without much need for debate. Adding archive formats is slightly more debatable.

And the patch no longer applies.

Crell’s picture

Version: x.y.z » 5.x-dev
Status: Needs work » Fixed

The OpenDoc file extensions were already added to Drupal 5, so closing this issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)