ImageStyleDownloadController::deliver presumes public scheme

Created on 1 September 2016, over 8 years ago
Updated 13 July 2023, over 1 year ago

Problem/Motivation

Install http://drupal.org/project/hash_wrapper and try to use image styles. It won't work. Copying out the image style URL reveals a 403.

    $target = $request->query->get('file');
    $image_uri = $scheme . '://' . $target;

This ends up being hash://2016-09/92/a8/92a8369c838bf8e20339f3b847cc9de9.jpg which is not correct. PathProcessorImageStyles and ImageStyleDownloadController assumes that scheme:// equals sites/default/files (or similar prefix) but that is only true for public://

Proposed resolution

I dunno. Maybe ImageStyle needs to talk to PathProcessorImageStyles to find out what deliver gets in ->get('file') and then should tokenize that instead of the original uri. PathProcessorImageStyles is very weird. We are not using globals in D8, do we. What is I $request->query->set('file', $file); then. I can't even.

Some serious refactoring / cleanup is in order.

Remaining tasks

TODO

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed

Version

9.5

Component
Image system 

Last updated 1 day ago

Created by

🇨🇦Canada chx

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024