From fbf7e289a9ae738344f9eefc6a6f45e80f9e7a56 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 19 Mar 2006 02:07:51 +0000 Subject: [PATCH] Updating phpmailer to 1.73. Some bugs solved. --- lib/phpmailer/ChangeLog.txt | 5 +++++ lib/phpmailer/class.phpmailer.php | 13 ++++++++----- lib/phpmailer/class.smtp.php | 5 ++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/phpmailer/ChangeLog.txt b/lib/phpmailer/ChangeLog.txt index 254971167b..db5f0d2f49 100644 --- a/lib/phpmailer/ChangeLog.txt +++ b/lib/phpmailer/ChangeLog.txt @@ -1,5 +1,10 @@ ChangeLog +Version 1.73 (Sun, Jun 10 2005) +* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf +* Now has a total of 20 translations +* Fixed alt attachments bug: http://tinyurl.com/98u9k + Version 1.72 (Wed, May 25 2004) * Added Dutch, Swedish, Czech, Norwegian, and Turkish translations. * Received: Removed this method because spam filter programs like diff --git a/lib/phpmailer/class.phpmailer.php b/lib/phpmailer/class.phpmailer.php index b315c178cd..2a9b1b1806 100644 --- a/lib/phpmailer/class.phpmailer.php +++ b/lib/phpmailer/class.phpmailer.php @@ -119,13 +119,13 @@ class PHPMailer * is in a different directory than the PHP include path. * @var string */ - var $PluginDir = ''; + var $PluginDir = ""; /** * Holds PHPMailer version. * @var string */ - var $Version = "1.72"; + var $Version = "1.73"; /** * Sets the email address that a reading confirmation will be sent. @@ -239,7 +239,7 @@ class PHPMailer $this->PluginDir = $CFG->libdir.'/phpmailer/'; } - + /** * Sets message type to HTML. @@ -471,7 +471,7 @@ class PHPMailer * @return bool */ function SmtpSend($header, $body) { - include_once($this->PluginDir.'class.smtp.php'); + include_once($this->PluginDir."class.smtp.php"); $error = ""; $bad_rcpt = array(); @@ -756,7 +756,7 @@ class PHPMailer { case "alt": // fall through - case "alt_attachment": + case "alt_attachments": $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); break; default: @@ -1103,9 +1103,12 @@ class PHPMailer $this->SetError($this->Lang("file_open") . $path); return ""; } + $magic_quotes = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); $file_buffer = fread($fd, filesize($path)); $file_buffer = $this->EncodeString($file_buffer, $encoding); fclose($fd); + set_magic_quotes_runtime($magic_quotes); return $file_buffer; } diff --git a/lib/phpmailer/class.smtp.php b/lib/phpmailer/class.smtp.php index 3b0b0b59a2..df3cfb58b7 100644 --- a/lib/phpmailer/class.smtp.php +++ b/lib/phpmailer/class.smtp.php @@ -333,11 +333,10 @@ class SMTP while(strlen($line) > $max_line_length) { $pos = strrpos(substr($line,0,$max_line_length)," "); - // Fix from http://www.addict3d.org/index.php?page=viewarticle&type=security&ID=4079 - if (!$pos) { + # Patch to fix DOS attack + if(!$pos) { $pos = $max_line_length - 1; } - // End of fix $lines_out[] = substr($line,0,$pos); $line = substr($line,$pos + 1); -- 2.39.5