My allowed file extension are txt msi mui.msi mst exe

If I'm uploading a file named "foo.1.0.0.Installer.MUI.msi" it get's renamed to foo.1.0.0.Installer.MUI_.msi and I have no idea why. Extension msi is allowed and I also tried mui.msi. Nothing works.

Note, file names cannot change.

The message is For security reasons, your upload has been renamed to %filename. from file_save_upload().

CommentFileSizeAuthor
#2 2012-03-25_155545.png14.52 KBhass

Comments

August1914’s picture

Status: Active » Closed (works as designed)

Essentially, a file extension is defined as that part of the filename which follows the final '.'. The '.' is not a supported character in the "allowed file extensions" in the field manager settings, (although nothing prevents you from adding it.)

If you change your "Allowed file extensions" to "txt, msi, mst, exe" (eliminating "mui.msi") then "foo.1.0.0.Installer.MUI.msi" will be uploaded without a name change. (works for me).

Some reference:
function file_munge_filename in file.inc, where it processes the filename to parts: $filename_parts = explode('.', $filename);

some related discussion:
http://drupal.org/node/285827
http://drupal.org/node/344658

hass’s picture

Status: Closed (works as designed) » Active
StatusFileSize
new14.52 KB

I've reviewed all settings again, see below. Your test results seems not correct. I guess you have not used the filename example I provided. See the node edit page:

2012-03-25_155545.png

webkenny’s picture

Category: bug » support

@hass, Just want to ensure you followed this step first:

If you change your "Allowed file extensions" to "txt, msi, mst, exe" (eliminating "mui.msi")...

I've done the same and it also works for me as it does for #1.

hass’s picture

Category: support » bug

See the screenshot, I removed it. The mui.msi was just a try as it does not work with "msi".

dave reid’s picture

I think if you add just 'mui' to your allowed extensions this should no longer happen.

So: txt msi mui msi mst exe

hass’s picture

Status: Active » Fixed

THX, that helped, however I do not understand why it's now not renaming Installer to Installer_.

This is not intuitive nor logic, nevertheless it works now properly.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

a