Don't decode recipent strings submitted by address book

release-0.6
thomascube 13 years ago
parent a41dcfecb0
commit fc072bfdb3

@ -312,12 +312,14 @@ $parts = array('to', 'cc', 'bcc', 'replyto', 'followupto');
foreach ($parts as $header) { foreach ($parts as $header) {
$fvalue = ''; $fvalue = '';
$decode_header = true;
// we have a set of recipients stored is session // we have a set of recipients stored is session
if ($header == 'to' && ($mailto_id = $_SESSION['compose']['param']['mailto']) if ($header == 'to' && ($mailto_id = $_SESSION['compose']['param']['mailto'])
&& $_SESSION['mailto'][$mailto_id] && $_SESSION['mailto'][$mailto_id]
) { ) {
$fvalue = urldecode($_SESSION['mailto'][$mailto_id]); $fvalue = urldecode($_SESSION['mailto'][$mailto_id]);
$decode_header = false;
} }
else if (!empty($_POST['_'.$header])) { else if (!empty($_POST['_'.$header])) {
$fvalue = get_input_value('_'.$header, RCUBE_INPUT_POST, TRUE); $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 // split recipients and put them back together in a unique way
if (!empty($fvalue) && in_array($header, array('to', 'cc', 'bcc'))) { 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(); $fvalue = array();
foreach ($to_addresses as $addr_part) { foreach ($to_addresses as $addr_part) {

Loading…
Cancel
Save