Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using a private filesystem, neither files nor images work, because file_get_file_references() is still severely broken.
#846296: file_file_download() only implements access checks for nodes and users tested part of file_get_file_references(), but not the part where the check is done across all the fields (ie. $field is NULL).
Comment | File | Size | Author |
---|---|---|---|
#5 | 867928-file-tests-d7.patch | 3.12 KB | andypost |
#2 | 867928-file-private-downloads-broken.patch | 905 bytes | Damien Tournoud |
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedThis was noted in the original post of #846296: file_file_download() only implements access checks for nodes and users.
Comment #2
Damien Tournoud CreditAttribution: Damien Tournoud commentedThe correct fix is simply, but we need a test of this.
Comment #3
andypostTested, works!
Comment #4
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD but setting to 'needs work' because we still need a test.
Comment #5
andypostExtended tests:
- Added check that file downloadable for public scheme
- Added check for changing 'uri_scheme' setting
- Added check for private method download works
Comment #6
Damien Tournoud CreditAttribution: Damien Tournoud commentedLooks good!
Comment #7
int CreditAttribution: int commentedCommit #402088 by Dries at 04:50
- Patch #867928 by Damien Tournoud, andypost: more tests for file and image handling.