mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-28 03:04:15 +00:00
Check permission on move destination.
This commit is contained in:
parent
2abf646429
commit
6560ea47a0
@ -25,13 +25,13 @@ if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || (isset($c->dbg['put'
|
||||
$lock_opener = $request->FailIfLocked();
|
||||
|
||||
if ( $request->path == '/' || $request->IsPrincipal() || $request->destination == '' ) {
|
||||
$request->NeedPrivilege('DAV::unbind', '/');
|
||||
$request->NeedPrivilege('DAV::unbind');
|
||||
}
|
||||
|
||||
$dest = new DAVResource($request->destination);
|
||||
|
||||
if ( $dest->dav_name() == '/' || $dest->IsPrincipal() ) {
|
||||
$request->NeedPrivilege('DAV::bind', '/');
|
||||
$dest->NeedPrivilege('DAV::bind');
|
||||
}
|
||||
|
||||
if ( ! $request->overwrite && $dest->Exists() ) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user