Merge pull request #2185 from owncloud/userext-smb-escapehost

Escape host argument when calling smbclient
This commit is contained in:
Vincent Petry
2016-07-06 13:01:33 +02:00
committed by GitHub

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(