mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-16 19:50:44 +01:00
* Filemanager/Sharing: deny rename, move, mkdir and rmdir on readonly share
This commit is contained in:
parent
3a24416eb9
commit
3689b3d645
@ -584,6 +584,11 @@ class StreamWrapper implements StreamWrapperIface
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// refuse to modify readonly target (eg. readonly share)
|
||||
if (self::url_is_readonly($url_to))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// if file is moved from one filesystem / wrapper to an other --> copy it (rename fails cross wrappers)
|
||||
if (Vfs::parse_url($url_from,PHP_URL_SCHEME) == Vfs::parse_url($url_to,PHP_URL_SCHEME))
|
||||
{
|
||||
@ -636,6 +641,11 @@ class StreamWrapper implements StreamWrapperIface
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// refuse to modify readonly target (eg. readonly share)
|
||||
if (self::url_is_readonly($url))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// check if recursive option is set and needed
|
||||
if (($options & STREAM_MKDIR_RECURSIVE) &&
|
||||
($parent_url = Vfs::dirname($url)) &&
|
||||
@ -908,7 +918,7 @@ class StreamWrapper implements StreamWrapperIface
|
||||
while (($rel_path = Vfs::basename($url).($rel_path ? '/'.$rel_path : '')) &&
|
||||
($url = Vfs::dirname($url)))
|
||||
{
|
||||
if (($stat = $this->url_stat($url,0,true,false)))
|
||||
if (($stat = $this->url_stat($url, 0, false, false)))
|
||||
{
|
||||
if (is_link($url) && ($lpath = Vfs::readlink($url)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user