IMCE breaks private file system

drpratten - January 5, 2007 - 12:12
Project:IMCE
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

imce.module does not provide an access permission to restrict file download by role.

By way of contrast, upload.module provides "view uploaded files" which in combination with the private file system will restrict access to uploaded files by role.

However, once imce is enabled - all requests for private files will always be provided by drupal. This defeats the idea of a private file system.

I request addition of a "view uploaded files" permission to the imce module, and patch to imce_file_download to return -1 if user_access('view uploaded file') fails.

Thanks

David

#1

drpratten - January 5, 2007 - 20:55

The core team may fix this bug once for the whole of Drupal. See http://drupal.org/node/106565

#2

ufku - January 7, 2007 - 23:14
Status:active» needs review

A private files permission specific to IMCE is a good idea. The attached patch proposes usage of a new "view imce files" permission.

AttachmentSize
imce.module.patch 1.08 KB

#3

Lowell - March 21, 2007 - 17:55

does this patch work?
is this something I can install now?

this might be exactly what I am looking for

#4

ufku - March 30, 2007 - 00:41

this is outdated. there are only a few changes to be done to get the mentioned functionality. you may update the patch for the current release and use it.

#5

DanielTheViking - August 9, 2008 - 15:08
Status:needs review» postponed (maintainer needs more info)

Is this still an issue in the latest release? (Should this one be closed?)

#6

MiMe - August 27, 2008 - 18:50

This is still an issue even for the Drupal 6 version of IMCE! Guests can access "private" (off site) files even though they don't have any permission to the directory.

#7

MiMe - August 27, 2008 - 19:11

Actually pretty easy to check in Drupal 6, in the function imce_file_download($file) you have to check if the current user have access to the file being viewed!

#8

MiMe - August 29, 2008 - 06:17

Those of you that are looking for a Drupal 6 fix: #266549: directory protection from leeching

 
 

Drupal is a registered trademark of Dries Buytaert.