mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
fix broken file-access cache after a917293 (fix smallPART file-access depending on full path)
fix wrong condition when storing an attachment, either the file or it's directory must be writable
This commit is contained in:
parent
3ac6cbba87
commit
965159d505
@ -1798,10 +1798,7 @@ class Link extends Link\Storage
|
|||||||
{
|
{
|
||||||
$cache |= $ret ? $required|Acl::READ : 0;
|
$cache |= $ret ? $required|Acl::READ : 0;
|
||||||
}
|
}
|
||||||
else
|
$ret = $ret ? $required|Acl::READ : 0;
|
||||||
{
|
|
||||||
$ret = $ret ? $required|Acl::READ : 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2017,7 +2017,7 @@ class Vfs extends Vfs\Base
|
|||||||
if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).",$check_is_uploaded_file) returning FALSE !is_uploaded_file()");
|
if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).",$check_is_uploaded_file) returning FALSE !is_uploaded_file()");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!(self::is_writable($target) || ($dir = self::dirname($target)) && self::is_writable($dir)))
|
if (!self::is_writable($target) && !(($dir = self::dirname($target)) && self::is_writable($dir)))
|
||||||
{
|
{
|
||||||
if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).",$check_is_uploaded_file) returning FALSE !writable");
|
if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).",$check_is_uploaded_file) returning FALSE !writable");
|
||||||
return false;
|
return false;
|
||||||
|
@ -113,7 +113,7 @@ class StreamWrapper extends LinksParent
|
|||||||
// vfs & stream-wrapper use posix rights, Api\Link::file_access uses Api\Acl::{EDIT|READ}!
|
// vfs & stream-wrapper use posix rights, Api\Link::file_access uses Api\Acl::{EDIT|READ}!
|
||||||
$required = $check & Vfs::WRITABLE ? Api\Acl::EDIT : Api\Acl::READ;
|
$required = $check & Vfs::WRITABLE ? Api\Acl::EDIT : Api\Acl::READ;
|
||||||
$access = Api\Link::file_access($app, $id, $required, $rel_path, $this->user);
|
$access = Api\Link::file_access($app, $id, $required, $rel_path, $this->user);
|
||||||
$what = "from Api\Link::file_access('$app', $id, $required, '$rel_path,".$this->user.")";
|
$what = "from Api\Link::file_access('$app', $id, $required, '$rel_path', ".$this->user.")";
|
||||||
}
|
}
|
||||||
if (self::DEBUG) error_log(__METHOD__."($url,$check) user=".Vfs::$user." ($what) ".($access?"access granted ($app:$id:$rel_path)":'no access!!!'));
|
if (self::DEBUG) error_log(__METHOD__."($url,$check) user=".Vfs::$user." ($what) ".($access?"access granted ($app:$id:$rel_path)":'no access!!!'));
|
||||||
return $access;
|
return $access;
|
||||||
@ -453,4 +453,4 @@ class StreamWrapper extends LinksParent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamWrapper::register();
|
StreamWrapper::register();
|
@ -1569,7 +1569,7 @@ class infolog_bo
|
|||||||
{
|
{
|
||||||
Link::set_cache('infolog',$info['info_id'],
|
Link::set_cache('infolog',$info['info_id'],
|
||||||
$this->link_title($info),
|
$this->link_title($info),
|
||||||
$this->file_access($info,Acl::EDIT) ? EGW_ACL_READ|EGW_ACL_EDIT :
|
$this->file_access($info,Acl::EDIT) ? Acl::READ|Acl::EDIT :
|
||||||
($this->file_access($info,Acl::READ) ? Acl::READ : 0));
|
($this->file_access($info,Acl::READ) ? Acl::READ : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user