Issue Bug Closed

#61295calculateBasePath of LocalDriver does not properly sanitize value

Bernhard Kraft 09/01/14, 15:35 updated 10/02/18, 11:52

Description

The method “calculateBasePath” of Resource/Driver/LocalDriver.php does not properly sanitize the passed value. It misses to use the return value of “canonicalizeAndCheckFilePath”.

This would result in problems when using “/fileadmin/” as “Base path” in a sys_file_storage record being set to “relative”.
It would also not remove the “/../” of a sys_file_storage base path like “/var/www/mysite/fileadmin/../../somewhereelse/” when being set to absolute.

Patch with unit tests sent to gerrit.

Reviews 2