Escape host argument in SMB user backend
This commit is contained in:
@@ -43,7 +43,7 @@ class OC_User_SMB extends \OCA\user_external\Base{
|
|||||||
$uidEscaped=escapeshellarg($uid);
|
$uidEscaped=escapeshellarg($uid);
|
||||||
$password=escapeshellarg($password);
|
$password=escapeshellarg($password);
|
||||||
$result=array();
|
$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);
|
$lastline = exec($command, $output, $retval);
|
||||||
if ($retval === 127) {
|
if ($retval === 127) {
|
||||||
OCP\Util::writeLog(
|
OCP\Util::writeLog(
|
||||||
|
|||||||
Reference in New Issue
Block a user