From 6560ea47a0ba541170173779af3f18b5a106586b Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 6 Mar 2010 23:25:30 +1300 Subject: [PATCH] Check permission on move destination. --- inc/caldav-MOVE.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/caldav-MOVE.php b/inc/caldav-MOVE.php index fc37017e..97802a61 100644 --- a/inc/caldav-MOVE.php +++ b/inc/caldav-MOVE.php @@ -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() ) {