diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-06-10 14:46:42 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-06-10 15:19:18 +0200 |
commit | b0314907c0f54eba5d4d3dbb153855f3321f360a (patch) | |
tree | cf84fc54b73c1ed88988f088125240125e48c993 | |
parent | 429fb8738641bd090bcc49923c5391e8bc3dcb45 (diff) | |
download | nextcloud-server-b0314907c0f54eba5d4d3dbb153855f3321f360a.tar.gz nextcloud-server-b0314907c0f54eba5d4d3dbb153855f3321f360a.zip |
Don't use command concatenation
Possibly fixes https://github.com/owncloud/core/issues/16853
-rw-r--r-- | apps/files_external/3rdparty/smb4php/smb.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_external/3rdparty/smb4php/smb.php b/apps/files_external/3rdparty/smb4php/smb.php index 7ffdb42e134..5db663b0bde 100644 --- a/apps/files_external/3rdparty/smb4php/smb.php +++ b/apps/files_external/3rdparty/smb4php/smb.php @@ -324,14 +324,14 @@ class smb { trigger_error('rename(): error in URL', E_USER_ERROR); } smb::clearstatcache ($url_from); - $cmd = ''; // check if target file exists if (smb::url_stat($url_to)) { // delete target file first - $cmd = 'del "' . $to['path'] . '"; '; + $cmd = 'del "' . $to['path'] . '"'; + smb::execute($cmd, $to); $replace = true; } - $cmd .= 'rename "' . $from['path'] . '" "' . $to['path'] . '"'; + $cmd = 'rename "' . $from['path'] . '" "' . $to['path'] . '"'; $result = smb::execute($cmd, $to); if ($replace) { // clear again, else the cache will return the info |