[interchange] Fix bug in [email] tag with reply and html attributes used in conjunction.
Stefan Hornburg <[email protected]>
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 3e49c7610d515c6cf5f70bedf08b4cef8a753554 Author: Stefan Hornburg (Racke) <[email protected]> Date: Tue Mar 8 20:31:50 2011 +0100 Fix bug in [email] tag with reply and html attributes used in conjunction. Thanks to Salvador Caballé for the report. code/UserTag/email.tag | 7 +++++-- lib/Vend/Util.pm | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) --- diff --git a/code/UserTag/email.tag b/code/UserTag/email.tag index 202d809..1b9e5d3 100644 --- a/code/UserTag/email.tag +++ b/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"); } diff --git a/lib/Vend/Util.pm b/lib/Vend/Util.pm index af44984..d047c34 100644 --- a/lib/Vend/Util.pm +++ b/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; _______________________________________________ interchange-cvs mailing list [email protected] http://www.icdevgroup.org/mailman/listinfo/interchange-cvs