Skip to content

issue #3405840: Different root paths for file_path in File- and StyleDownloadController

Using an absolute path makes XsendfileFileDownloadController::download() behave the same as XsendfileImageStyleDownloadController::deliver(), that also uses absolute paths.

Also the old implementation had a bug:

base_path() . Settings::get('file_private_path')

If the base path was "/" and file_privat_path was a relative path, e.g. "../private_files", the path would then be "/../private_files", which is an invalid absolute path. The base path should not have been part of the path, as it refers to the public URI of the site and has nothing to do with the local file system.

Closes #3405840

Merge request reports

Loading