Download & Extend

field_file_check_directory() checks beyond the file system

Project:ImageField
Version:6.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Amitaibu
Status:closed (fixed)

Issue Summary

In field_file_check_directory() I've added dpm($directory).

For FileFields I got a normal output
/var/www/vhosts/example.com/files

However for ImageField I got the picture attached.

AttachmentSize
snap1.png34.67 KB

Comments

#1

My problem by the way is the I get a
warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts/XXX.com) is not within the allowed path(s): (/var/www/vhosts/XXX.com/httpdocs:/tmp:/var/www/vhosts/XXX.com/private)

#2

Assigned to:Anonymous» Amitaibu
Status:active» needs review

Patch allow checking only directories inside the file path.

AttachmentSize
420666_filefield_check_dir_3.patch 889 bytes

#3

Status:needs review» fixed

Thanks Amitaibu, checked with private and public files and it works as expected. Thanks for the nice fix!

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.