Skip to content

Commit

Permalink
Updating phpmailer to 1.73. Some bugs solved.
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Mar 19, 2006
1 parent b4750d4 commit fbf7e28
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
5 changes: 5 additions & 0 deletions lib/phpmailer/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 8 additions & 5 deletions lib/phpmailer/class.phpmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -239,7 +239,7 @@ function PHPMailer () {
$this->PluginDir = $CFG->libdir.'/phpmailer/';
}



/**
* Sets message type to HTML.
Expand Down Expand Up @@ -471,7 +471,7 @@ function MailSend($header, $body) {
* @return bool
*/
function SmtpSend($header, $body) {
include_once($this->PluginDir.'class.smtp.php');
include_once($this->PluginDir."class.smtp.php");
$error = "";
$bad_rcpt = array();

Expand Down Expand Up @@ -756,7 +756,7 @@ function SetWordWrap() {
{
case "alt":
// fall through
case "alt_attachment":
case "alt_attachments":
$this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap);
break;
default:
Expand Down Expand Up @@ -1103,9 +1103,12 @@ function EncodeFile ($path, $encoding = "base64") {
$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;
}
Expand Down
5 changes: 2 additions & 3 deletions lib/phpmailer/class.smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,10 @@ function Data($msg_data) {
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);
Expand Down

0 comments on commit fbf7e28

Please sign in to comment.