Escape host argument in SMB user backend

This commit is contained in:
Vincent Petry
2016-07-04 10:20:14 +02:00
parent 0991141c26
commit b88c6d4b7a

View File

@@ -43,7 +43,7 @@ class OC_User_SMB extends \OCA\user_external\Base{
$uidEscaped=escapeshellarg($uid);
$password=escapeshellarg($password);
$result=array();
$command=self::SMBCLIENT.' //'.$this->host.'/dummy -U'.$uidEscaped.'%'.$password;
$command=self::SMBCLIENT.' '.escapeshellarg('//' . $this->host . '/dummy').' -U'.$uidEscaped.'%'.$password;
$lastline = exec($command, $output, $retval);
if ($retval === 127) {
OCP\Util::writeLog(