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:07:08 +0300
commit84fcf806646ee59090fb8d18e0e7b1934c788e9a (patch)
tree241e23a9db2a3747953e7dcb39fc3e6942964ae2
parent5154cc3e2c0e9d7f0a0e44d1609f3c3b83ccc402 (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 d43a1ea9b73..456f1a1a368 100644
--- a/apps/files_external/3rdparty/smb4php/smb.php
+++ b/apps/files_external/3rdparty/smb4php/smb.php
@@ -76,6 +76,11 @@ class smb {
function execute ($command, $purl) {
+ 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