[drupal-devel] [bug] file_create_path() is faulty in 4.6 and HEAD
drumm
drupal-devel at drupal.org
Tue May 17 22:55:51 UTC 2005
Issue status update for http://drupal.org/node/23100
Project: Drupal
Version: 4.6.0
Component: file system
Category: bug reports
Priority: critical
Assigned to: drumm
Reported by: drumm
Updated by: drumm
Status: patch
Attachment: http://drupal.org/files/issues/file.inc_4.diff (1.04 KB)
Conditions to reproduce:
- 'Temporary directory' on the admin/settings page is configured to
something not starting with the configuration of 'File system path'.
For example, the default '/tmp' does not start with the default file
system path 'files'.
- There are not directories named the same as the temporary directory
in the file system path. In the above example, path/to/drupal/files/tmp
should not exist.
What happens:
1. file_create_path('/tmp/something') is called.
2. file_check_location('/tmp/something', 'files') returns false.
3. Fall back to file_check_location('files//tmp/something', 'files'),
which does one of two things:
- if path/to/drupal/files/tmp exists that is happily used, ignoring the
admin's configuration, and things work.
- otherwise the whole thing returns FALSE and a bunch of stuff up the
stack gets horribly confused.
Solution:
Lets add in another check to see if the file is in the temporary
directory between steps 2 and 3.
drumm
More information about the drupal-devel
mailing list