If you are using Private file system B7M is denying access to uploaded files in a cck filefield.

backup_migrate_file_download() is denying access to files it has nothing to do with.

Regards
Geoff

Comments

phayes’s picture

Priority: Normal » Critical

This is seriously critical as it will break sites that rely on fielfields and private file systems (not a rare occurrence)

eric at nrd’s picture

subscribing

This issue appears to disallow access to any filefield data on sites utilizing private files.

It looks to me like _backup_migrate_path_is_in_save_dir($path) is returning a non-null value for all filefield $path inputs. This in turn makes the inner block of backup_migrate_file_download($path) always execute, and thus return -1 for filefield files.

mholloway’s picture

Status: Active » Needs review
StatusFileSize
new869 bytes

This also interferes with modules implementing hook_file_download() for mixed public/private files.

The problem is when _backup_migrate_path_is_in_save_dir() gets an unexpected empty $mode. It should return FALSE in that case.

This patch fixes that problem. Not tested with Filefields problem, but cures my public/private downloads problem.

ronan’s picture

Status: Needs review » Postponed (maintainer needs more info)

Can you guys confirm that you're using the latest version in the 2.x branch?

mholloway’s picture

Yes, my public/private files problem was a problem in the 1.x branch and I'm not seeing it in the 2.x branch.

ronan’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

The 1.x branch is not actively supported, so if you need to use the private file system please make sure you're using the 2.x branch.