Patch (to be ported)
Project:
IMCE SWFUpload
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Sep 2011 at 20:04 UTC
Updated:
10 Jan 2012 at 04:23 UTC
When uploading files via the Bulk Uploader, logged in as any user besides admin, I'd get the error:
"Error uploading file filename.extension: Invalid user"
After some investigation, it appeared the $_COOKIE wasn't being set properly. It was set before sess_read, but inside sess_read it was NULL, and caused the above error.
Instead of checking if the user is logged in via sess_read, I changed it to check to see if the global user id is greater than 0 and it works great.
Others have had this problem:
http://drupal.org/node/1240752#comment-4877076
If you think this is a good solution, please consider the attached patch for the next release.
| Comment | File | Size | Author |
|---|---|---|---|
| imce_swfupload.module.patch | 636 bytes | jamesdixon |
Comments
Comment #1
tekante commentedI'll have to do some research on this. I believe that I was originally unable to rely on the global $user because the flash object based request didn't pass along the session cookies from the browser so you weren't really logged in during processing. Hence feeding the session ID and submitting it as part of the form. Can you let me know which browser you were testing with?
Comment #2
jamesdixon commentedGotcha, I was using Firefox 7.0.1. It may be some obscure server configuration issue as well, as it's only been reported by a couple users.
Comment #3
tekante commentedThanks for the additional info, I now realize I also should have asked for your flash version as well. Thanks.
Comment #4
jamesdixon commentedI have flash: MAC 10,1,102,64.
Now that I think of it this didn't start happening until I uploaded to the live server. There were also some other weird configuration issues that were blocking IE users (mod_security was creating 406 errors when attempting to upload files).
I'm almost certain it has something to do with the server environment, but to pinpoint it down to what I'm not sure. Here's some info if it helps:
PHP Version 5.2.17
MySql Client Version 5.0.91
Comment #5
djween commentedsubscribe