[Pkg-owncloud-commits] [owncloud] 03/07: Also check if the source path is valid for rename and copy operations
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:09:54 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.0.15
in repository owncloud.
commit d38c7a1688b3e5cdca0e27effd9be493d1de3605
Author: Robin Appelman <icewind at owncloud.com>
Date: Sun Apr 28 19:29:42 2013 +0200
Also check if the source path is valid for rename and copy operations
---
lib/filesystemview.php | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index ed52ba1..fb8d8dc 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -259,7 +259,9 @@ class OC_FilesystemView {
public function rename($path1,$path2){
$absolutePath1=$this->getAbsolutePath($path1);
$absolutePath2=$this->getAbsolutePath($path2);
- if(OC_FileProxy::runPreProxies('rename',$absolutePath1,$absolutePath2) and OC_Filesystem::isValidPath($path2)){
+ if(OC_FileProxy::runPreProxies('rename',$absolutePath1,$absolutePath2)
+ and OC_Filesystem::isValidPath($path1)
+ and OC_Filesystem::isValidPath($path2)){
$path1=$this->getRelativePath($absolutePath1);
$path2=$this->getRelativePath($absolutePath2);
if($path1==null or $path2==null){
@@ -290,7 +292,9 @@ class OC_FilesystemView {
public function copy($path1,$path2){
$absolutePath1=$this->getAbsolutePath($path1);
$absolutePath2=$this->getAbsolutePath($path2);
- if(OC_FileProxy::runPreProxies('copy',$absolutePath1,$absolutePath2) and OC_Filesystem::isValidPath($path2)){
+ if(OC_FileProxy::runPreProxies('copy',$absolutePath1,$absolutePath2)
+ and OC_Filesystem::isValidPath($path1)
+ and OC_Filesystem::isValidPath($path2)){
$path1=$this->getRelativePath($absolutePath1);
$path2=$this->getRelativePath($absolutePath2);
if($path1==null or $path2==null){
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list