Download & Extend

image.module uses file_create_url() incorrectly

Project:Drupal core
Version:7.x-dev
Component:image.module
Category:bug report
Priority:normal
Assigned:Wim Leers
Status:needs work

Issue Summary

The Drupal 7.20 security release introduced this change:

-  return file_create_url($uri);
+  $file_url = file_create_url($uri);
+  // Append the query string with the token.
+  return $file_url . (strpos($file_url, '?') !== FALSE ? '&' : '?') . drupal_http_build_query($token_query);

This means the query string is effectively not available for hook_file_url_alter() to be modified, i.e. it breaks file URL altering.


This breaks CDN module's Far Future expiration functionality.

AttachmentSizeStatusTest resultOperations
7.21_correct_file_create_url_usage.patch776 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 40,405 pass(es), 30 fail(s), and 4 exception(s).View details | Re-test

Comments

#1

Status:needs review» needs work

The last submitted patch, 7.21_correct_file_create_url_usage.patch, failed testing.

#2

Version:7.21» 7.x-dev
Status:needs work» needs review

#3

#4

Status:needs review» needs work

The last submitted patch, 7.21_correct_file_create_url_usage.patch, failed testing.