diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-03-30 22:51:57 +0300 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-06-01 18:05:15 +0300 |
commit | 72e576e5290d77c0850c5a54bc1f23bbc150c63c (patch) | |
tree | 5802c16b1031ca4b9884b585ca49615faaf3483d | |
parent | 7b5493ea21925391e0cb6480faabb1c465b3437e (diff) |
Disallow semicolons in passed commands
-rw-r--r-- | apps/files_external/3rdparty/smb4php/smb.php | 5 |
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 |