]> source.dussan.org Git - nextcloud-server.git/commit
use ExecutableFinder and find in findBinaryPath
authorOlivier Paroz <github@oparoz.com>
Mon, 26 Jan 2015 11:32:17 +0000 (12:32 +0100)
committerOlivier Paroz <github@oparoz.com>
Tue, 31 Mar 2015 21:49:16 +0000 (23:49 +0200)
commit7c41c0c13f1a845fdcedd62218de490e8c01691b
tree387b7e9b73d6fcff19ae85ec9800f7121b4a098f
parent691c353eeda077be0fcca1e3839265815a650a90
use ExecutableFinder and find in findBinaryPath

When using open_basedir, commands such as `which`or `command`can fail
because they might try to look outside of the restricted perimeter.
Symfony's ExecutableFinder can be used instead to look in standard
locations and we can use `find` as a last resort

A better solution would be to adopt a mechanism similar to what has
been done for office documents where a configuration parameter is used
to indicate the path where the executable is to be found.
lib/private/helper.php