Changeset 50848 for branches/5.6/src/wp-includes/PHPMailer/PHPMailer.php
- Timestamp:
- 05/12/2021 10:24:16 PM (4 years ago)
- Location:
- branches/5.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.6
-
branches/5.6/src/wp-includes/PHPMailer/PHPMailer.php
r49714 r50848 1762 1762 protected static function isPermittedPath($path) 1763 1763 { 1764 return !preg_match('#^[a-z]+://#i', $path); 1764 //Matches scheme definition from https://tools.ietf.org/html/rfc3986#section-3.1 1765 return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path); 1765 1766 } 1766 1767 … … 1774 1775 protected static function fileIsAccessible($path) 1775 1776 { 1777 if (!static::isPermittedPath($path)) { 1778 return false; 1779 } 1776 1780 $readable = file_exists($path); 1777 1781 //If not a UNC path (expected to start with \\), check read permission, see #2069 … … 1779 1783 $readable = $readable && is_readable($path); 1780 1784 } 1781 return static::isPermittedPath($path) &&$readable;1785 return $readable; 1782 1786 } 1783 1787
Note: See TracChangeset
for help on using the changeset viewer.