Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
file.module
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
29 Nov 2010 at 18:57 UTC
Updated:
29 Jul 2014 at 19:11 UTC
Jump to comment: Most recent file
Currently the file_field_widget_uri() function calls token_replace() on the upload directory path, but it improperly duplicates the 'current-user' token by injecting it with $data['user']. And the function also has a mystery $account parameter that is not used at all in core, and so I changed it to $data as an empty array which is passed into token_replace().
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 984456-7.patch | 2.11 KB | bfroehle |
| #4 | 984456-file-field-widget-uri-token-cleanup.patch | 2.89 KB | dave reid |
| #2 | 984456-file-field-widget-uri-token-cleanup.patch | 1.38 KB | dave reid |
| #1 | 984456-file-field-widget-uri-token-cleanup-D7.patch | 1.38 KB | dave reid |
Comments
Comment #1
dave reidComment #2
dave reidGrr, are patches with '-D7' still being ignored??
Comment #4
dave reidComment #6
moshe weitzman commentedSeems like a useful patch. Can we fix the test failure? Migrate is starting to use this function.
Comment #7
bfroehle commentedThis breaks the test, as we compare the token for the file (uploaded by uid = 2), with the token replacement for the current-user (uid = 1).
Powered by Dreditor.
Comment #8
bfroehle commentedImplemented.
Comment #9
dave reidThanks for fixing the test failure. Looks good.
Comment #10
dawehnerComment #11
dries commentedCommitted to 7.x and 8.x. Thanks!
Comment #12
aspilicious commenteduntagging