1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

extra vetting on input - thanks nlstart

This commit is contained in:
e107steved
2007-06-19 20:16:25 +00:00
parent 7005fbdd00
commit cd5cd7e22a

View File

@@ -390,10 +390,9 @@ class PHPMailer
*/ */
function SendmailSend($header, $body) { function SendmailSend($header, $body) {
if ($this->Sender != "") 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 else
$sendmail = sprintf("%s -oi -t", $this->Sendmail); $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail));
if(!@$mail = popen($sendmail, "w")) if(!@$mail = popen($sendmail, "w"))
{ {
$this->SetError($this->Lang("execute") . $this->Sendmail); $this->SetError($this->Lang("execute") . $this->Sendmail);