Issue Bug Closed

#52173Wrong storage is selected if file is outside of available storages

Markus Klein 09/22/13, 13:53 updated 10/02/18, 12:10

Description

findBestMatchingStorageByLocalPath() does not check whether a requested file actually exists in the selected storage.
It selects the “best matching storage”, but this might not contain the actual file if it is requested from a path outside of the available storages.

Example:

page.10 = IMAGE
page.10.file = fileadmin/images/dummy.png
Configured storages:
  • fileadmin/user_upload/
  • uploads/

Result:
Storage fileadmin/user_upload/ is selected, since it “best matches” with “fileadmin”.

Reviews 6