Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-03-30 22:51:57 +0300
committerLukas Reschke <lukas@owncloud.com>2015-06-01 18:05:15 +0300
commit72e576e5290d77c0850c5a54bc1f23bbc150c63c (patch)
tree5802c16b1031ca4b9884b585ca49615faaf3483d
parent7b5493ea21925391e0cb6480faabb1c465b3437e (diff)
Disallow semicolons in passed commands
-rw-r--r--apps/files_external/3rdparty/smb4php/smb.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_external/3rdparty/smb4php/smb.php b/apps/files_external/3rdparty/smb4php/smb.php
index e325506fa14..7ffdb42e134 100644
--- a/apps/files_external/3rdparty/smb4php/smb.php
+++ b/apps/files_external/3rdparty/smb4php/smb.php
@@ -112,6 +112,11 @@ class smb {
function execute ($command, $purl, $regexp = NULL) {
+ if (strpos($command,';') !== false) {
+ trigger_error('Semicolon not supported in commands');
+ exit();
+ }
+
return smb::client ('-d 0 '
. escapeshellarg ('//' . $purl['host'] . '/' . $purl['share'])
. ' -c ' . escapeshellarg ($command), $purl, $regexp