Page 1 of 1

[SOLVED] Bug with files which have a space in their title

PostPosted: Mon Mar 28, 2011 7:13 pm
by Elthib
Hi all,

I discover a bug in your script. There is a bug with files which have a space in their name when we click on "Download File Now". For example :

"file-test.zip" will work for download

but

"file test.zip" will not download...

Moreover, i think there is a problem with captcha code...

Re: Bug with files which have a space in their title

PostPosted: Mon Mar 28, 2011 7:29 pm
by Mpeter19
file download works without problems!

Do you have all rights set correctly? so you can check how the admin pannel to check the entry!

Re: Bug with files which have a space in their title

PostPosted: Mon Mar 28, 2011 7:59 pm
by Elthib
Yes all is chmod to 777

I've got that problem only with files with a space in their name, like i said :

"file-one.rar" or "file_one.rar", for example, will download but

"file one.rar" with a space won't download...

Re: Bug with files which have a space in their title

PostPosted: Mon Mar 28, 2011 10:27 pm
by Elthib
well... i think it's because i deleted some datas concerning the security code for download ... it didn't like it... :lol:

i would like to remove the security code, how can we do that ?

Re: [SOLVED] Bug with files which have a space in their titl

PostPosted: Mon Mar 28, 2011 11:15 pm
by SamEA
Elthib wrote:Hi all,

I discover a bug in your script. There is a bug with files which have a space in their name when we click on "Download File Now". For example :

"file-test.zip" will work for download

but

"file test.zip" will not download...

Moreover, i think there is a problem with captcha code...


Captcha should be working just fine, unless it doesn't show at all which means it's a PHP config issue, however in regards to the space issue I have added a code in ./upload.php to replace all files including spaces with an underscore ("_"). Just download the newer and updated version here: http://www.daddyscripts.com/forum/viewtopic.php?f=4&t=29&p=121#p121 and replace the ./upload.php file. To change the underscore to another character, just modify the following piece of code in ./upload.php where it contains the underscore
Code: Select all
$filename = str_replace(" ",'_',"$filename");
.

Re: [SOLVED] Bug with files which have a space in their titl

PostPosted: Tue Mar 29, 2011 11:35 am
by Elthib
okay, it works fine now, thanks for your help ;)