Skip to content

Commit

Permalink
Fixed PHPMailer problems
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmayer committed Sep 25, 2016
1 parent e37b560 commit 6c2d7cd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libraries/vendor/phpmailer/phpmailer/class.phpmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ protected function addAnAddress($kind, $address, $name = '')
}
if ($kind != 'Reply-To') {
if (!array_key_exists(strtolower($address), $this->all_recipients)) {
$this->$kind[] = array($address, $name);
array_push($this->$kind, array($address, $name));
$this->all_recipients[strtolower($address)] = true;
return true;
}
Expand Down
22 changes: 17 additions & 5 deletions libraries/vendor/phpmailer/phpmailer/extras/htmlfilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function tln_tagprint($tagname, $attary, $tagtype)
if (is_array($attary) && sizeof($attary)) {
$atts = array();
while (list($attname, $attvalue) = each($attary)) {
$atts[] = "$attname=$attvalue";
array_push($atts, "$attname=$attvalue");
}
$fulltag .= ' ' . join(' ', $atts);
}
Expand Down Expand Up @@ -1127,10 +1127,22 @@ function HTMLFilter($body, $trans_image_path, $block_external_images = false)
);

if ($block_external_images) {
$bad_attvals{'/.*/'}{'/^src|background/i'}[0][] = '/^([\'\"])\s*https*:.*([\'\"])/si';
$bad_attvals{'/.*/'}{'/^src|background/i'}[1][] = "\\1$trans_image_path\\1";
$bad_attvals{'/.*/'}{'/^style/i'}[0][] = '/url\(([\'\"])\s*https*:.*([\'\"])\)/si';
$bad_attvals{'/.*/'}{'/^style/i'}[1][] = "url(\\1$trans_image_path\\1)";
array_push(
$bad_attvals{'/.*/'}{'/^src|background/i'}[0],
'/^([\'\"])\s*https*:.*([\'\"])/si'
);
array_push(
$bad_attvals{'/.*/'}{'/^src|background/i'}[1],
"\\1$trans_image_path\\1"
);
array_push(
$bad_attvals{'/.*/'}{'/^style/i'}[0],
'/url\(([\'\"])\s*https*:.*([\'\"])\)/si'
);
array_push(
$bad_attvals{'/.*/'}{'/^style/i'}[1],
"url(\\1$trans_image_path\\1)"
);
}

$add_attr_to_tag = array(
Expand Down

0 comments on commit 6c2d7cd

Please sign in to comment.