From b88c6d4b7a90d8b4b77215fabefa5fb6f04a3a16 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 4 Jul 2016 10:20:14 +0200 Subject: [PATCH] Escape host argument in SMB user backend --- lib/smb.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/smb.php b/lib/smb.php index ffc9b24..5b19199 100644 --- a/lib/smb.php +++ b/lib/smb.php @@ -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(