]> source.dussan.org Git - nextcloud-server.git/commitdiff
Disallow semicolons in passed commands
authorLukas Reschke <lukas@owncloud.com>
Mon, 30 Mar 2015 19:51:57 +0000 (21:51 +0200)
committerLukas Reschke <lukas@owncloud.com>
Mon, 1 Jun 2015 15:06:21 +0000 (17:06 +0200)
apps/files_external/3rdparty/smb4php/smb.php

index e325506fa147eeac74018de5875346ee1f69a46c..7ffdb42e134492307e0b0e8591f5d55e4cd6cc17 100644 (file)
@@ -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