mrman23 Posted March 2, 2008 Share Posted March 2, 2008 Hi, I have a log in script and Flash upload system that work as expected in IE, but as soon as they are applied in Firefox/Safari nothing. I have read around and it seems that this is to do with the way F&S deal with Sessions: http://www.avertlabs.com/research/bl...ation-puzzles/ Now whilst that site offers a solution I am unable to get it to work (probably missing something obvious!). My setup works like this, someone logs in using sessions, they navigate around and have the ability to upload images, to give them a graphical representation of the upload I opted to use a Flash bar that when sent back to php uses the login session to call a name from MySQL to name the uploaded file. This works fine on its own (without renaming) and in IE (with renaming) but nowhere else. Not sure if there is an obvious work-around or a quick fix way to make the session from login carry through to the upload php without striping the uploaded file from the system(?) Thanks for any suggestions/solutions! Link to comment https://forums.phpfreaks.com/topic/94008-php-sessions-setting-sessions-from-flash/ Share on other sites More sharing options...
alecks Posted March 2, 2008 Share Posted March 2, 2008 link is broken... Link to comment https://forums.phpfreaks.com/topic/94008-php-sessions-setting-sessions-from-flash/#findComment-481615 Share on other sites More sharing options...
mrman23 Posted March 2, 2008 Author Share Posted March 2, 2008 Sorry 'bout that: http://www.avertlabs.com/research/blog/index.php/2007/09/24/click-fraud-captchas-session-fixation-puzzles/ Link to comment https://forums.phpfreaks.com/topic/94008-php-sessions-setting-sessions-from-flash/#findComment-481654 Share on other sites More sharing options...
mrman23 Posted March 2, 2008 Author Share Posted March 2, 2008 Here's the basic upload php page, as above when I place the include login at the beginning of the code it works fine in IE but not in the other major browsers. <?php if (is_uploaded_file($_FILES['Filedata']['tmp_name'])) { $uploadDirectory = "uploads/"; function findexts ($filename) { $filename = strtolower($filename) ; $exts = split("[/\\.]", $filename) ; $n = count($exts)-1; $exts = $exts[$n]; return $exts; } $ext = findexts ($_FILES['Filedata']['name']) ; $name = "$username"; $newname = "$name".".".$ext; $uploadFile = $uploadDirectory . basename($newname); copy($_FILES['Filedata']['tmp_name'], $uploadFile); } ?> Link to comment https://forums.phpfreaks.com/topic/94008-php-sessions-setting-sessions-from-flash/#findComment-481810 Share on other sites More sharing options...
mrman23 Posted March 5, 2008 Author Share Posted March 5, 2008 So I guess no-one can help? Link to comment https://forums.phpfreaks.com/topic/94008-php-sessions-setting-sessions-from-flash/#findComment-484185 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.