From: Andrew Dolgov Date: Fri, 23 Nov 2007 02:48:07 +0000 (+0100) Subject: fix vulnerability in PHPMailer X-Git-Tag: 1.2.18~15 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=090ac2fea07da2c4a380329fafa6c4a5f15f5e2f;p=tt-rss.git fix vulnerability in PHPMailer --- diff --git a/phpmailer/class.phpmailer.php b/phpmailer/class.phpmailer.php index 5eb7ac05..061a16f4 100644 --- a/phpmailer/class.phpmailer.php +++ b/phpmailer/class.phpmailer.php @@ -390,9 +390,11 @@ class PHPMailer */ function SendmailSend($header, $body) { if ($this->Sender != "") - $sendmail = sprintf("%s -oi -f %s -t", $this->Sendmail, $this->Sender); + $sendmail = sprintf("%s -oi -f %s -t", + escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); else - $sendmail = sprintf("%s -oi -t", $this->Sendmail); + $sendmail = sprintf("%s -oi -t", + escapeshellcmd($this->Sendmail)); if(!@$mail = popen($sendmail, "w")) { @@ -1496,4 +1498,4 @@ class PHPMailer } } -?> \ No newline at end of file +?>