commit cb0fac212560763ef39c3dec1f4b56d52404f845
Author: Ayesh Karunaratne <ayesh@aye.sh>
Date: Thu Apr 29 20:42:01 2021 +0530
Update to PHPMailer 6.4.1
diff --git a/src/wp-includes/PHPMailer/PHPMailer.php b/src/wp-includes/PHPMailer/PHPMailer.php
index 8b27efc461..25818104e0 100644
|
a
|
b
|
class PHPMailer |
| 748 | 748 | * |
| 749 | 749 | * @var string |
| 750 | 750 | */ |
| 751 | | const VERSION = '6.4.0'; |
| | 751 | const VERSION = '6.4.1'; |
| 752 | 752 | |
| 753 | 753 | /** |
| 754 | 754 | * Error severity: message only, continue processing. |
| … |
… |
protected function sendmailSend($header, $body) |
| 1723 | 1723 | fwrite($mail, $header); |
| 1724 | 1724 | fwrite($mail, $body); |
| 1725 | 1725 | $result = pclose($mail); |
| | 1726 | $addrinfo = static::parseAddresses($toAddr); |
| 1726 | 1727 | $this->doCallback( |
| 1727 | 1728 | ($result === 0), |
| 1728 | | [$toAddr], |
| | 1729 | [[$addrinfo['address'], $addrinfo['name']]], |
| 1729 | 1730 | $this->cc, |
| 1730 | 1731 | $this->bcc, |
| 1731 | 1732 | $this->Subject, |
| … |
… |
protected static function isShellSafe($string) |
| 1812 | 1813 | */ |
| 1813 | 1814 | protected static function isPermittedPath($path) |
| 1814 | 1815 | { |
| 1815 | | return !preg_match('#^[a-z]+://#i', $path); |
| | 1816 | //Matches scheme definition from https://tools.ietf.org/html/rfc3986#section-3.1 |
| | 1817 | return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path); |
| 1816 | 1818 | } |
| 1817 | 1819 | |
| 1818 | 1820 | /** |
| … |
… |
protected static function isPermittedPath($path) |
| 1824 | 1826 | */ |
| 1825 | 1827 | protected static function fileIsAccessible($path) |
| 1826 | 1828 | { |
| | 1829 | if (!static::isPermittedPath($path)) { |
| | 1830 | return false; |
| | 1831 | } |
| 1827 | 1832 | $readable = file_exists($path); |
| 1828 | 1833 | //If not a UNC path (expected to start with \\), check read permission, see #2069 |
| 1829 | 1834 | if (strpos($path, '\\\\') !== 0) { |
| 1830 | 1835 | $readable = $readable && is_readable($path); |
| 1831 | 1836 | } |
| 1832 | | return static::isPermittedPath($path) && $readable; |
| | 1837 | return $readable; |
| 1833 | 1838 | } |
| 1834 | 1839 | |
| 1835 | 1840 | /** |
| … |
… |
protected function mailSend($header, $body) |
| 1878 | 1883 | if ($this->SingleTo && count($toArr) > 1) { |
| 1879 | 1884 | foreach ($toArr as $toAddr) { |
| 1880 | 1885 | $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); |
| 1881 | | $this->doCallback($result, [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); |
| | 1886 | $addrinfo = static::parseAddresses($toAddr); |
| | 1887 | $this->doCallback( |
| | 1888 | $result, |
| | 1889 | [[$addrinfo['address'], $addrinfo['name']]], |
| | 1890 | $this->cc, |
| | 1891 | $this->bcc, |
| | 1892 | $this->Subject, |
| | 1893 | $body, |
| | 1894 | $this->From, |
| | 1895 | [] |
| | 1896 | ); |
| 1882 | 1897 | } |
| 1883 | 1898 | } else { |
| 1884 | 1899 | $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); |
| … |
… |
protected function smtpSend($header, $body) |
| 1967 | 1982 | $isSent = true; |
| 1968 | 1983 | } |
| 1969 | 1984 | |
| 1970 | | $callbacks[] = ['issent' => $isSent, 'to' => $to[0]]; |
| | 1985 | $callbacks[] = ['issent' => $isSent, 'to' => $to[0], 'name' => $to[1]]; |
| 1971 | 1986 | } |
| 1972 | 1987 | } |
| 1973 | 1988 | |
| … |
… |
protected function smtpSend($header, $body) |
| 1988 | 2003 | foreach ($callbacks as $cb) { |
| 1989 | 2004 | $this->doCallback( |
| 1990 | 2005 | $cb['issent'], |
| 1991 | | [$cb['to']], |
| | 2006 | [[$cb['to'], $cb['name']]], |
| 1992 | 2007 | [], |
| 1993 | 2008 | [], |
| 1994 | 2009 | $this->Subject, |
diff --git a/src/wp-includes/PHPMailer/SMTP.php b/src/wp-includes/PHPMailer/SMTP.php
index 9d85929ddf..0e7f53df50 100644
|
a
|
b
|
class SMTP |
| 35 | 35 | * |
| 36 | 36 | * @var string |
| 37 | 37 | */ |
| 38 | | const VERSION = '6.4.0'; |
| | 38 | const VERSION = '6.4.1'; |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * SMTP line break constant. |