Versions:
Drupal 7.0
IMCE 7.x-1.1

WYSIWYG 7.x-2.0
CKEditor 3.5 (revision 6260)
IMCE Mkdir 7.x-1.0-beta2
IMCE Wysiwyg bridge 7.x-1.x-dev (11/07/10)

It is not possible to upload files with extensions other than "jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp".

For exemple a swf file can't be uploaded.

Restricting the uploaded extensions for example just to txt files works well, but if I try to add extensions that are not in the list above or if I use * (like the default for User-1 Profile) in the "Permitted file extensions" field the uploads are still restricted to the above list.

This behaviour happens in the User profile File Browser Tab and in the wysiwyg editor, so I think the problem is in the IMCE module.

Debugging the code this problem seems to be related to the fact that the structure of the $validators array() used in line 287 of imce.page.inc does not match the expected structure of file_save_upload().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ufku’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
1.35 KB

file_save_upload appears to use the default extension validator when none is specified, which results in two separate extension validators.

The patch fixes this.

mabuweb’s picture

Status: Needs review » Fixed

I applied your patch and it solves the problem for me.
Thank you!

tekante’s picture

Simple update to patch so tools like drush make can make use of it

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

lpeabody’s picture

Issue summary: View changes
Status: Closed (fixed) » Reviewed & tested by the community

Re-opening this as it never made it's way into 7.x-1.x-dev. I've tested this and confirmed it works. Thanks!

ufku’s picture

Status: Reviewed & tested by the community » Closed (cannot reproduce)