FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Comments on installing FUD 1.1.1 on Win2K
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Comments on installing FUD 1.1.1 on Win2K [message #414 is a reply to message #411] Mon, 11 February 2002 19:49 Go to previous messageGo to previous message
ironstorm is currently offline  ironstorm   Canada
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 Smile 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 Smile


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;
}

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 1.1.1 - SQL data not escaped [when magic quotes turned off]
Next Topic: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Dec 12 16:45:45 GMT 2024

Total time taken to generate the page: 0.03932 seconds