Closed (fixed)
Project:
Avatar Selection
Version:
5.x-2.1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
2 Aug 2007 at 09:01 UTC
Updated:
17 Oct 2007 at 09:36 UTC
Hello there,
I installed latest 5.x-2.1 release, and my images started to return 403 access denied. After some investigation, it seems that implementation of file_download hook is wrong:
if ('avatar_selection' == $folder) {
$info = image_get_info(file_create_path($file));
return array(
'Content-type: '. $info['mime_type'],
'Content-length: '. $info['file_size'],
);
}
else {
return -1;
}
I read that hook should not return -1 since it totally stops access, for more information please look similar issue, instead hook should return null ( commenting out "else { return -1; }" fixed my problem )
I'm not some kind of experienced programmer but hope it helps
Comments
Comment #1
stella commentedI've changed that function so it now returns null instead of -1. I've added it to CVS and it will be included in the next release.
Thanks!
Stella
Comment #2
(not verified) commentedComment #3
stella commentedmarking #178172 and #176504 as duplicates of this issue.
Stella
Comment #4
stella commentedReleased in Avatar Selection 5.x-2.2.
Cheers,
Stella