Changeset 50800 for branches/5.7/src/wp-includes/PHPMailer/PHPMailer.php
- Timestamp:
- 04/29/2021 08:31:13 PM (3 years ago)
- Location:
- branches/5.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.7
-
branches/5.7/src/wp-includes/PHPMailer/PHPMailer.php
r50630 r50800 749 749 * @var string 750 750 */ 751 const VERSION = '6.4. 0';751 const VERSION = '6.4.1'; 752 752 753 753 /** … … 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, … … 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 … … 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 … … 1830 1835 $readable = $readable && is_readable($path); 1831 1836 } 1832 return static::isPermittedPath($path) &&$readable;1837 return $readable; 1833 1838 } 1834 1839 … … 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 { … … 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 } … … 1989 2004 $this->doCallback( 1990 2005 $cb['issent'], 1991 [ $cb['to']],2006 [[$cb['to'], $cb['name']]], 1992 2007 [], 1993 2008 [],
Note: See TracChangeset
for help on using the changeset viewer.