Upload disabled for admin ?

ulhume - January 30, 2008 - 08:34
Project:Drupal
Version:5.7
Component:upload.module
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Where admin user (uid == 1) is uploading a file using the "attach" button (Javascript callback), the upload looks like everything is fine but when submiting the form, nothing is saved.

Problem comes from upload.module, at line 331, where we have :
if ($user->uid != 1) {
// Here something.php.pps becomes something.php_.pps
$file->filename = upload_munge_filename($file->filename, NULL, 0);
$file->description = $file->filename;
}

Solution is just to remove the test in order to allow admin user to apply attachments. I thought this can be a security issue but using classical method (browsing, adding the file and just submitting the form) is correctly working for admin user.

#1

drumm - February 11, 2008 - 04:36
Status:active» active (needs more info)

I can not reproduce this bug. What filename caused the issue? How large was the file?

#2

ulhume - September 25, 2008 - 08:52
Status:active (needs more info)» closed

-

 
 

Drupal is a registered trademark of Dries Buytaert.