Navigation Menu

Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
apphp committed Feb 5, 2021
1 parent 962b478 commit 79be661
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions framework/vendors/phpmailer/class.phpmailer.php
Expand Up @@ -23,7 +23,6 @@
* #002 - 26.06.2012 : commented echo invalid_address (doesn't present in current version)
* #003 - 13.03.2015 : added auto include of class.smtp.php
* #004 - 14.12.2016 : default CharSet changed from 'iso-8859-1' to 'utf-8'
* #005 - 11.12.2020 : commented magic_quotes functionality
*/

/**
Expand Down Expand Up @@ -2712,28 +2711,8 @@ protected function encodeFile($path, $encoding = 'base64')
if (!is_readable($path)) {
throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
}
//#005
//$magic_quotes = get_magic_quotes_runtime();
//if ($magic_quotes) {
// if (version_compare(phpversion(), '5.3.0', '<')) {
// set_magic_quotes_runtime(false);
// } else {
// //Doesn't exist in PHP 5.4, but we don't need to check because
// //get_magic_quotes_runtime always returns false in 5.4+
// //so it will never get here
// ini_set('magic_quotes_runtime', false);
// }
//}
$file_buffer = file_get_contents($path);
$file_buffer = $this->encodeString($file_buffer, $encoding);
//#005
//if ($magic_quotes) {
// if (version_compare(phpversion(), '5.3.0', '<')) {
// set_magic_quotes_runtime($magic_quotes);
// } else {
// ini_set('magic_quotes_runtime', $magic_quotes);
// }
//}
return $file_buffer;
} catch (Exception $exc) {
$this->setError($exc->getMessage());
Expand Down Expand Up @@ -2791,7 +2770,7 @@ public function encodeHeader($str, $position = 'text')
switch (strtolower($position)) {
case 'phrase':
if (!preg_match('/[\200-\377]/', $str)) {
// Can't use addslashes as we don't know the value of magic_quotes_sybase
// Can't use addslashes as we don't know the value of
$encoded = addcslashes($str, "\0..\37\177\\\"");
if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) {
return ($encoded);
Expand Down

0 comments on commit 79be661

Please sign in to comment.