Fix for [1639] given by anonymous in CopyOneFile

This commit is contained in:
Benjamin Sonntag 2015-04-29 12:53:45 +02:00
parent 666d485da7
commit 058d6e9acd
1 changed files with 1 additions and 3 deletions

View File

@ -662,7 +662,7 @@ class m_bro {
} else { } else {
$dest=$this->convertabsolute($dest,false); $dest=$this->convertabsolute($dest,false);
} }
if (!$file || !$dest) { if (!$file || !$dest || !is_readable($file)) {
$err->raise("bro",_("File or folder name is incorrect")); $err->raise("bro",_("File or folder name is incorrect"));
return 1; return 1;
} }
@ -742,8 +742,6 @@ class m_bro {
*/ */
function CopyOneFile($src, $dest) { function CopyOneFile($src, $dest) {
global $err; global $err;
$src=escapeshellarg($src);
$dest=escapeshellarg($dest);
exec("cp -Rpf ".escapeshellarg($src)." ".escapeshellarg($dest), $void, $ret); exec("cp -Rpf ".escapeshellarg($src)." ".escapeshellarg($dest), $void, $ret);
if ($ret) { if ($ret) {
$err->raise("bro","Errors happened while copying the source to destination. cp return value: %d", $ret); $err->raise("bro","Errors happened while copying the source to destination. cp return value: %d", $ret);