Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug in [email] tag with reply and html attributes used in conjunc…

…tion.

Thanks to Salvador Caballé for the report.
  • Loading branch information...
commit 3e49c7610d515c6cf5f70bedf08b4cef8a753554 1 parent 46c10ac
@racke racke authored
Showing with 6 additions and 3 deletions.
  1. +5 −2 code/UserTag/email.tag
  2. +1 −1  lib/Vend/Util.pm
View
7 code/UserTag/email.tag
@@ -59,8 +59,6 @@ sub {
and ::logError("Header injection attempted in email tag: %s", $1);
}
- $reply = '' unless defined $reply;
- $reply = "Reply-to: $reply\n" if $reply;
for (grep /\S/, split /[\r\n]+/, $extra) {
# require header conformance with RFC 2822 section 2.2
@@ -106,6 +104,7 @@ sub {
$subject = utf8_to_other($subject, 'MIME-Header');
$cc = utf8_to_other($cc, 'MIME-Header');
$bcc = utf8_to_other($bcc, 'MIME-Header');
+ $reply = utf8_to_other($reply, 'MIME-Header');
}
my $msg = new MIME::Lite
@@ -115,6 +114,7 @@ sub {
Type => $opt->{mimetype},
Cc => $cc,
Bcc => $bcc,
+ 'Reply-To' => $reply,
;
for(@extra) {
@@ -226,6 +226,9 @@ sub {
}
}
+ $reply = '' unless defined $reply;
+ $reply = "Reply-to: $reply\n" if $reply;
+
if ($cc) {
push(@extra, "Cc: $cc");
}
View
2  lib/Vend/Util.pm
@@ -2031,7 +2031,7 @@ sub send_mail {
$to = $1;
}
elsif (/^Reply-to:\s*(.+)/si) {
- $reply = $_;
+ $reply = $1;
}
elsif (/^subj(?:ect)?:\s*(.+)/si) {
$subject = $1;
Please sign in to comment.
Something went wrong with that request. Please try again.