Re: Comments on installing FUD 1.1.1 on Win2K [message #414 is a reply to message #411] |
Mon, 11 February 2002 19:49 |
ironstorm
Messages: 89 Registered: February 2002 Location: Toronto, Ontario, Canada
Karma:
|
Member |
|
|
hackie wrote on Mon, 11 February 2002 2:36 PM |
this isn't the 1/2 of it.. you man, helped us a lot for example if you notice we have a bug with in the post bodies (or anywhere else), which we already fixed in 1.2.0 which is gunna comeout in a a day or so.... and it's also a whole lot faster due to this fix
|
Thank goodness, I can't wait for 1.2, I have a bunch of guys in my dept beating on 1.1.1 and we've discovered that post bodies bug and a file upload problem in attach.inc to do with an extra slash being added in...
admin wrote on Mon, 11 February 2002 7:41 PM | Here are the two functions that need to be corrected in attach.inc to fix uploads
function replace($original_name, $cur_location) { $proto = proto($cur_location); Q("UPDATE fud_attach SET proto='$proto', original_name='$original_name', location='$cur_location' WHERE id=".$this->id); if ( $proto == 'LOCAL' ) { $loc = $GLOBALS['FILE_STORE'].$this->id.'.atch'; // '/'. if ( file_exists($loc) ) unlink($loc); safe_attachment_copy($cur_location, $id); } }
And also
function safe_attachment_copy($source, $id) { $loc = $GLOBALS['FILE_STORE'].$id.'.atch'; //'/'. if ( file_exists($loc) ) { unlink($loc); std_out('"'.$loc.'" already exists, but shouldn't (old file unlinked), check security', 'ERR'); } $fp = @fopen($loc, 'w'); if ( !$fp ) { std_out('unable to create source file ('.$loc.') check permissions on ('.$GLOBALS['FILE_STORE'].'), we suggest 1777', 'ERR'); exit('file attachment error'); } chmod($loc, 0644); $fp_s = fopen($source, 'r'); if ( !$fp_s ) { fclose($fp); std_out('unable to read temporary attachment file, ('.$source.')', 'ERR'); exit('file attachment error'); } while ( $str=fread($fp_s, 4096) ) { fwrite($fp, $str); } fclose($fp); fclose($fp_s); return $loc; }
|
[Updated on: Mon, 11 February 2002 19:50] Report message to a moderator
|
|
|