From: Lukas Reschke Date: Mon, 30 Mar 2015 19:51:57 +0000 (+0200) Subject: Disallow semicolons in passed commands X-Git-Tag: v7.0.6RC2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=200e9d949783efbd57f39acedebc03924c1dfff4;p=nextcloud-server.git Disallow semicolons in passed commands --- 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