Open zhifuchang opened 12 years ago
Could you please clarify this issue?
Does this affect BitTorrent or HTTP Downloads or the Web-UI?
BitTorrent can transfer the files, but bitflu cannot. i used bitflu as the upload server, and the others used bitflu as client. in the upload server, it always cannot complete ++++++++++++++++++++++++++++++++++++
bitflu> vd *\ Upload: 0.00 KiB/s | Download: 0.33 KiB/s | Peers: 0/ 1 [Type] Name /================ Hash ================\ Peers Pieces Done (MB) Done Ratio Up Down ETA [ bt ] yihaodian/b2b-central_1 c533ebac99c0542a837c7dd577c69ee49b3247be 0/ 0 285/ 286 79.2/ 79.5 99% 2.00 0.0 0.0 34m [ bt ] yihaodian/central3 f0435e13b888035449df9a2f235b0cc004842654 0/ 1 100/ 102 9.9/ 10.1 98% 4.00 0.0 0.0 25m +++++++++++++++++++++++++++++++++++++++++++++++++++ some file with . prefix will be rename to prefix. but space included filename will not, the upload server's pregress is less than 100%, also the client. and the left files are including space in name or with . prefix. i have read your code, i think maybe the problem is create the torrent, Thanks.
have a look at my picture,
first i found .md5sum cannot be download, and i find the client has renamed the file to _md5sum
later i rename the file .md5sum to _md5sum in the server, it can transfer, so i think the . is the problem
the .idea is replaced to _idea by bitflu automatically too, It cannot be download, Later, I rename to _idea in the server , but i also cannot be download
because this time _idea's parent directory is "Pro Demo", include a space, so it stop again
if i rename the "Pro Demo" to "Pro_Demo", there is no problem.
Thanks, Zhong
Date: Tue, 31 Jul 2012 13:17:24 -0700 From: reply@reply.github.com To: zeno.chen@hotmail.com Subject: Re: [bitflu] some files can not in the transmission (#13)
Could you please clarify this issue?
Does this affect BitTorrent or HTTP Downloads or the Web-UI?
Reply to this email directly or view it on GitHub: https://github.com/adrian-bl/bitflu/issues/13#issuecomment-7410115
I fixed the . problem, in the file 00_StorageVFS.pm comment the line 671 ########################################################################## sub FsSaveDirent { my($self, $val) = @; $val =~ tr/\/\0\n\r/_/;
$val ||= "NULL";
$val = "\@LongName_".$self->{super}->Tools->sha1_hex($val) if length($val) > VFS_FNAME_MAX;
return $val;
}
Removing this regexp introduces a security issue as a malicious torrent could write data outside it's own directory.
However: If you only create your own torrents, it won't be a problem.
Then we use the line below will be better?
$val =~ s/.{2,}//g;
to avoid the security issue.
because some times we have the hidden files like .htaccess
Thanks for you relies.
I find is the filename's prefix is '.' [dot] or filename include the ' ' [space], then the file cannot be download, can you give me some suggestion?