]> git.mjollnir.org Git - moodle.git/commitdiff
Updating phpmailer to 1.73. Some bugs solved.
authorstronk7 <stronk7>
Sun, 19 Mar 2006 02:07:51 +0000 (02:07 +0000)
committerstronk7 <stronk7>
Sun, 19 Mar 2006 02:07:51 +0000 (02:07 +0000)
lib/phpmailer/ChangeLog.txt
lib/phpmailer/class.phpmailer.php
lib/phpmailer/class.smtp.php

index 254971167bef79d61a3199ed71bb91c0ca7feab9..db5f0d2f49f0105e89a8f80aef7a67d19d617978 100644 (file)
@@ -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 
index b315c178cd63e3a93e55c9f8067a3f54e8434396..2a9b1b1806ee0a56f9b1df6371c1b8c6b909b5a6 100644 (file)
@@ -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;
     }
index 3b0b0b59a25fa96de65b86aa0413addf8df75e6a..df3cfb58b73e60cbd9706cddc59d157a2acf6e0a 100644 (file)
@@ -333,11 +333,10 @@ class SMTP
             while(strlen($line) > $max_line_length) {\r
                 $pos = strrpos(substr($line,0,$max_line_length)," ");\r
 \r
-                // Fix from http://www.addict3d.org/index.php?page=viewarticle&type=security&ID=4079\r
-                if (!$pos) {\r
+                # Patch to fix DOS attack\r
+                if(!$pos) {\r
                     $pos = $max_line_length - 1;\r
                 }\r
-                // End of fix\r
 \r
                 $lines_out[] = substr($line,0,$pos);\r
                 $line = substr($line,$pos + 1);\r