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.
| Comment | File | Size | Author |
|---|---|---|---|
| upload-extensions.patch | 1.68 KB | axel |
Comments
Comment #1
axel commentedComment #2
killes@www.drop.org commentedWith such a long list of allowed extensions we should consider to change to a blacklist instead of a whitelist.
Comment #3
axel commentedReasonable 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?
Comment #4
Crell commentedIf 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.
Comment #5
drummWhat 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.
Comment #6
Crell commentedThe OpenDoc file extensions were already added to Drupal 5, so closing this issue.
Comment #7
(not verified) commented