Changeset 54937
- Timestamp:
- 12/06/2022 12:17:12 PM (2 years ago)
- Location:
- trunk/src/wp-includes/PHPMailer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/PHPMailer/PHPMailer.php
r54427 r54937 751 751 * @var string 752 752 */ 753 const VERSION = '6. 6.5';753 const VERSION = '6.7'; 754 754 755 755 /** … … 859 859 { 860 860 //Check overloading of mail function to avoid double-encoding 861 if ( ini_get('mbstring.func_overload') & 1) { // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated861 if ((int)ini_get('mbstring.func_overload') & 1) { // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated 862 862 $subject = $this->secureHeader($subject); 863 863 } else { … … 1123 1123 //Immediately add standard addresses without IDN. 1124 1124 return call_user_func_array([$this, 'addAnAddress'], $params); 1125 } 1126 1127 /** 1128 * Set the boundaries to use for delimiting MIME parts. 1129 * If you override this, ensure you set all 3 boundaries to unique values. 1130 * The default boundaries include a "=_" sequence which cannot occur in quoted-printable bodies, 1131 * as suggested by https://www.rfc-editor.org/rfc/rfc2045#section-6.7 1132 * 1133 * @return void 1134 */ 1135 public function setBoundaries() 1136 { 1137 $this->uniqueid = $this->generateId(); 1138 $this->boundary[1] = 'b1=_' . $this->uniqueid; 1139 $this->boundary[2] = 'b2=_' . $this->uniqueid; 1140 $this->boundary[3] = 'b3=_' . $this->uniqueid; 1125 1141 } 1126 1142 … … 1674 1690 } 1675 1691 } catch (Exception $exc) { 1692 $this->setError($exc->getMessage()); 1693 $this->edebug($exc->getMessage()); 1676 1694 if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true && $this->smtp->connected()) { 1677 1695 $this->smtp->reset(); 1678 1696 } 1679 $this->setError($exc->getMessage());1680 $this->edebug($exc->getMessage());1681 1697 if ($this->exceptions) { 1682 1698 throw $exc; … … 2797 2813 $body = ''; 2798 2814 //Create unique IDs and preset boundaries 2799 $this->uniqueid = $this->generateId(); 2800 $this->boundary[1] = 'b1_' . $this->uniqueid; 2801 $this->boundary[2] = 'b2_' . $this->uniqueid; 2802 $this->boundary[3] = 'b3_' . $this->uniqueid; 2815 $this->setBoundaries(); 2803 2816 2804 2817 if ($this->sign_key_file) { … … 2836 2849 } 2837 2850 //Use this as a preamble in all multipart message types 2838 $mimepre = ' This is a multi-part message in MIME format.' . static::$LE . static::$LE;2851 $mimepre = ''; 2839 2852 switch ($this->message_type) { 2840 2853 case 'inline': … … 3073 3086 3074 3087 /** 3088 * Get the boundaries that this message will use 3089 * @return array 3090 */ 3091 public function getBoundaries() 3092 { 3093 if (empty($this->boundary)) { 3094 $this->setBoundaries(); 3095 } 3096 return $this->boundary; 3097 } 3098 3099 /** 3075 3100 * Return the start of a message boundary. 3076 3101 * … … 4189 4214 * @param string|null $value Header value 4190 4215 * 4216 * @return bool True if a header was set successfully 4191 4217 * @throws Exception 4192 4218 */ … … 4638 4664 4639 4665 /** 4640 * Remove trailing breaksfrom a string.4666 * Remove trailing whitespace from a string. 4641 4667 * 4642 4668 * @param string $text 4643 4669 * 4670 * @return string The text to remove whitespace from 4671 */ 4672 public static function stripTrailingWSP($text) 4673 { 4674 return rtrim($text, " \r\n\t"); 4675 } 4676 4677 /** 4678 * Strip trailing line breaks from a string. 4679 * 4680 * @param string $text 4681 * 4644 4682 * @return string The text to remove breaks from 4645 4683 */ 4646 public static function stripTrailing WSP($text)4647 { 4648 return rtrim($text, " \r\n\t");4684 public static function stripTrailingBreaks($text) 4685 { 4686 return rtrim($text, "\r\n"); 4649 4687 } 4650 4688 … … 4812 4850 4813 4851 //Reduce multiple trailing line breaks to a single one 4814 return static::stripTrailing WSP($body) . self::CRLF;4852 return static::stripTrailingBreaks($body) . self::CRLF; 4815 4853 } 4816 4854 -
trunk/src/wp-includes/PHPMailer/SMTP.php
r54427 r54937 36 36 * @var string 37 37 */ 38 const VERSION = '6. 6.5';38 const VERSION = '6.7'; 39 39 40 40 /**
Note: See TracChangeset
for help on using the changeset viewer.