AssetControllerBase does not check files correctly for BinaryFileResponse

Created on 13 August 2024, 5 months ago

Problem/Motivation

On certain URL's its possible to get a `Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException`.
This is due to an incompole check in the AssetControllerBase, if the file_exists method returns true - we assume that its a file.
But it true if the file or directory exists... so directories are allowed by this, but not for a BinaryFileResponse.

Proposed resolution

We shoud use `is_file` instead. This does the exists check AND if its a file check.
The issue is in AssetControllerBase::deliver:120

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Asset library 

Last updated about 11 hours ago

No maintainer
Created by

🇳🇱Netherlands makertimswis

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024