Skip to content

Commit

Permalink
Updated PHP Mailer to v5.2.22
Browse files Browse the repository at this point in the history
  • Loading branch information
cwsoft committed Feb 10, 2017
1 parent 89eff23 commit 5030708
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 857 deletions.
415 changes: 0 additions & 415 deletions wbce/include/phpmailer/ChangeLog.txt

This file was deleted.

218 changes: 0 additions & 218 deletions wbce/include/phpmailer/README

This file was deleted.

2 changes: 1 addition & 1 deletion wbce/include/phpmailer/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.2.21
5.2.22
32 changes: 23 additions & 9 deletions wbce/include/phpmailer/class.phpmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PHPMailer
* The PHPMailer Version number.
* @var string
*/
public $Version = '5.2.21';
public $Version = '5.2.22';

/**
* Email priority.
Expand Down Expand Up @@ -2492,6 +2492,7 @@ public function textLine($value)

/**
* Add an attachment from a path on the filesystem.
* Never use a user-supplied path to a file!
* Returns false if the file could not be found or read.
* @param string $path Path to the attachment.
* @param string $name Overrides the attachment name.
Expand Down Expand Up @@ -3017,6 +3018,7 @@ public function addStringAttachment(
* displayed inline with the message, not just attached for download.
* This is used in HTML messages that embed the images
* the HTML refers to using the $cid value.
* Never use a user-supplied path to a file!
* @param string $path Path to the attachment.
* @param string $cid Content ID of the attachment; Use this to reference
* the content when using an embedded image in HTML.
Expand Down Expand Up @@ -3380,12 +3382,14 @@ public function getCustomHeaders()
* Create a message body from an HTML string.
* Automatically inlines images and creates a plain-text version by converting the HTML,
* overwriting any existing values in Body and AltBody.
* $basedir is used when handling relative image paths, e.g. <img src="images/a.png">
* Do not source $message content from user input!
* $basedir is prepended when handling relative URLs, e.g. <img src="/images/a.png"> and must not be empty
* will look for an image file in $basedir/images/a.png and convert it to inline.
* If you don't want to apply these transformations to your HTML, just set Body and AltBody yourself.
* If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email)
* If you don't want to apply these transformations to your HTML, just set Body and AltBody directly.
* @access public
* @param string $message HTML message string
* @param string $basedir base directory for relative paths to images
* @param string $basedir Absolute path to a base directory to prepend to relative paths to images
* @param boolean|callable $advanced Whether to use the internal HTML to text converter
* or your own custom converter @see PHPMailer::html2text()
* @return string $message The transformed message Body
Expand All @@ -3394,6 +3398,10 @@ public function msgHTML($message, $basedir = '', $advanced = false)
{
preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images);
if (array_key_exists(2, $images)) {
if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
// Ensure $basedir has a trailing /
$basedir .= '/';
}
foreach ($images[2] as $imgindex => $url) {
// Convert data URIs into embedded images
if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) {
Expand All @@ -3411,18 +3419,24 @@ public function msgHTML($message, $basedir = '', $advanced = false)
$message
);
}
} elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[a-z][a-z0-9+.-]*://#i', $url)) {
// Do not change urls for absolute images (thanks to corvuscorax)
continue;
}
if (
// Only process relative URLs if a basedir is provided (i.e. no absolute local paths)
!empty($basedir)
// Ignore URLs containing parent dir traversal (..)
&& (strpos($url, '..') === false)
// Do not change urls that are already inline images
&& substr($url, 0, 4) !== 'cid:'
// Do not change absolute URLs, including anonymous protocol
&& !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url)
) {
$filename = basename($url);
$directory = dirname($url);
if ($directory == '.') {
$directory = '';
}
$cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2
if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
$basedir .= '/';
}
if (strlen($directory) > 1 && substr($directory, -1) != '/') {
$directory .= '/';
}
Expand Down
2 changes: 1 addition & 1 deletion wbce/include/phpmailer/class.pop3.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class POP3
* @var string
* @access public
*/
public $Version = '5.2.21';
public $Version = '5.2.22';

/**
* Default POP3 port number.
Expand Down
4 changes: 2 additions & 2 deletions wbce/include/phpmailer/class.smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SMTP
* The PHPMailer SMTP version number.
* @var string
*/
const VERSION = '5.2.21';
const VERSION = '5.2.22';

/**
* SMTP line break constant.
Expand Down Expand Up @@ -81,7 +81,7 @@ class SMTP
* @deprecated Use the `VERSION` constant instead
* @see SMTP::VERSION
*/
public $Version = '5.2.21';
public $Version = '5.2.22';

/**
* SMTP server port number.
Expand Down
28 changes: 0 additions & 28 deletions wbce/include/phpmailer/index.php

This file was deleted.

28 changes: 0 additions & 28 deletions wbce/include/phpmailer/language/index.php

This file was deleted.

Loading

0 comments on commit 5030708

Please sign in to comment.