diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-02-11 09:06:53 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-02-11 09:06:53 +0100 |
commit | 03de1329efbcff2a4052ba6289bde1befb1ef0df (patch) | |
tree | 3859e8ca0b0ca904c9ea8c19c252bdc462a5f192 | |
parent | 36848be23afaa50671995c62f00e7c7cde2f5438 (diff) |
Fix invalid X-Draft-Info on forwarded message draft (#1489587)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | program/lib/Roundcube/rcube_storage.php | 5 | ||||
-rw-r--r-- | program/steps/mail/compose.inc | 3 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 2 |
4 files changed, 9 insertions, 2 deletions
@@ -6,6 +6,7 @@ CHANGELOG Roundcube Webmail - Fix issue when default_addressbook option is set to integer value (#1489407) - Fix Opera > 15 detection (#1489562) - Fix security issue in DomainFactory driver of Password plugin +- Fix invalid X-Draft-Info on forwarded message draft (#1489587) RELEASE 1.0-rc -------------- diff --git a/program/lib/Roundcube/rcube_storage.php b/program/lib/Roundcube/rcube_storage.php index ca65af1cb..c09f05328 100644 --- a/program/lib/Roundcube/rcube_storage.php +++ b/program/lib/Roundcube/rcube_storage.php @@ -613,7 +613,7 @@ abstract class rcube_storage /** * Parse message UIDs input * - * @param mixed $uids UIDs array or comma-separated list or '*' or '1:*' + * @param mixed $uids UIDs array or comma-separated list or '*' or '1:*' * * @return array Two elements array with UIDs converted to list and ALL flag */ @@ -633,6 +633,9 @@ abstract class rcube_storage if (is_array($uids)) { $uids = join(',', $uids); } + else if (strpos($uids, ':')) { + $uids = join(',', rcube_imap_generic::uncompressMessageSet($uids)); + } if (preg_match('/[^0-9,]/', $uids)) { $uids = ''; diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 6e478c656..8504d026c 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -1250,6 +1250,9 @@ function rcmail_write_forward_attachments() $index = $storage->index(null, rcmail_sort_column(), rcmail_sort_order()); $COMPOSE['forward_uid'] = $index->get(); } + else if (strpos($COMPOSE['forward_uid'], ':')) { + $COMPOSE['forward_uid'] = rcube_imap_generic::uncompressMessageSet($COMPOSE['forward_uid']); + } else { $COMPOSE['forward_uid'] = explode(',', $COMPOSE['forward_uid']); } diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 0619d630b..2cd897e46 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -209,7 +209,7 @@ if (!empty($COMPOSE['reply_uid']) && $savedraft) { $headers['X-Draft-Info'] = array('type' => 'reply', 'uid' => $COMPOSE['reply_uid']); } else if (!empty($COMPOSE['forward_uid']) && $savedraft) { - $headers['X-Draft-Info'] = array('type' => 'forward', 'uid' => $COMPOSE['forward_uid']); + $headers['X-Draft-Info'] = array('type' => 'forward', 'uid' => rcube_imap_generic::compressMessageSet($COMPOSE['forward_uid'])); } if (!empty($COMPOSE['reply_msgid'])) { |