diff options
author | thomascube <thomas@roundcube.net> | 2011-04-12 07:27:59 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-04-12 07:27:59 +0000 |
commit | fc072bfdb38f3b6dccaf9c9c3c309b36e604d4e6 (patch) | |
tree | 1f42aa7b19c85f2e0decc76990eb7cc49590c533 /program | |
parent | a41dcfecb073d86cf02d4790d86a28945930ff73 (diff) |
Don't decode recipent strings submitted by address book
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/mail/compose.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 0a949949f..3f2390491 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -312,12 +312,14 @@ $parts = array('to', 'cc', 'bcc', 'replyto', 'followupto'); foreach ($parts as $header) { $fvalue = ''; + $decode_header = true; // we have a set of recipients stored is session if ($header == 'to' && ($mailto_id = $_SESSION['compose']['param']['mailto']) && $_SESSION['mailto'][$mailto_id] ) { $fvalue = urldecode($_SESSION['mailto'][$mailto_id]); + $decode_header = false; } else if (!empty($_POST['_'.$header])) { $fvalue = get_input_value('_'.$header, RCUBE_INPUT_POST, TRUE); @@ -371,7 +373,7 @@ foreach ($parts as $header) { // split recipients and put them back together in a unique way if (!empty($fvalue) && in_array($header, array('to', 'cc', 'bcc'))) { - $to_addresses = $IMAP->decode_address_list($fvalue); + $to_addresses = $IMAP->decode_address_list($fvalue, null, $decode_header); $fvalue = array(); foreach ($to_addresses as $addr_part) { |