Trying to share a symlink actually uses the link target instead

This commit is contained in:
nathangray 2018-04-09 11:33:42 -06:00
parent c508cd8731
commit abc1ccc8f1

View File

@ -442,6 +442,12 @@ class Sharing
$path = 'vfs://default'.($path[0] == '/' ? '' : '/').$path;
}
// We don't allow sharing links, share target instead
if($target = Vfs::readlink($path))
{
$path = $target;
}
if (($exists = ($stat = Vfs::stat($path)) && Vfs::check_access($path, Vfs::READABLE, $stat)))
{
$vfs_path = $path;