Closed (fixed)
Project:
Filebrowser
Version:
6.x-2.x-dev
Component:
Directory Listing Pages
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2010 at 04:42 UTC
Updated:
11 Jan 2011 at 00:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
Nicolas Georget commentedi checked a while your code and i think i found the error: It's into your function
filebrowser_filebrowser_download_manager_process()line 888:Should be:
Or better you should write:
if (strpos($web_root, $file) === false) {...}to be sure of the condition value that returned.Can you confirm before to close the issue ?
Comment #2
clivesj commentedSame problem, Solved.
Using the sept 19th dev version, I had this problem.
The download location filesbrowser/download/125 was not pointing to the proper location.
The files/folder part of the URL was truncated and the file was not found.
After changin line 888 as you suggested it is working as a charm now.
Thanks
Comment #3
Nicolas Georget commentedAnd i should learn php ;-)
{...} === 0is not equivalent to{...} === falseAnyway, i let Yoran fix and close this track
Comment #4
clivesj commentedI still have problems with this as the URL is truncated and therefore not ointing to the proper location.
The code from line 888:
$web_root; /home/peter/test/drupal
$file: site/default/files/musicdocs/classical/song1.pdf
strpos return FALSE and truncates $target to ; cdocs/classical/song1.pdf ($file minus length of $webroot).
Browser goes to http://www.example.com/cdocs/classical/song1.pdf and does not find the file.
If I change to code to
if (!strpos($web_root, $file) == 0) // !the browser goes to
http;//www.example.com/site/default/files/musicdocs/classical/song1.pdf and finds the file
Comment #5
Nicolas Georget commentedSorry, i don't get it:
And it returns
falseas expected.So if strpos return FALSE, how PHP can truncates $target ?!
Comment #6
clivesj commentedHello Nicolas,
Well this is very stupid of me:
My code was:
I changed == into === before as stated in your post #1, but because I re-installed the module I lost that manual change.
I re-corrected the double equation into triples, and now everything works fine again.
Any chance that you can roll an updated -dev version?
Thanks for the nice module and your time.
Comment #7
Nicolas Georget commentedI would like but i don't have the access to the filebrowser's SVN. Only Yoran is the maintainer of this module. And he "disappears from the planet drupal" since 2 months now.
Actually, i made many patches (#924856: File as Attachment or Inline and/or #924988: Zip Archive created and download it) to resolve some bugs and i see many tracks could be duplicated #842682: File downloads inaccessible after upgrading, various error messages
We definitively need a new dev version.
Comment #8
Nicolas Georget commentedSubmitting a patch (Yoran, where are you ?!??)
Comment #9
clivesj commentedComment #10
Yoran commentedFixed in dev. Thanks Nicolas.
Once again, If you have any blocking issue, never hesitate to shake me by email !! This bug tracker is ..., hum, let's say no easy to follow :)
Comment #11
Yoran commented