Fix splitting message identifiers into UID and folder values

pull/175/head
Thomas Bruederli 11 years ago
parent 1883048720
commit 1d1fdcbf8c

@ -1709,7 +1709,7 @@ class rcube_imap extends rcube_storage
// decode combined UID-folder identifier // decode combined UID-folder identifier
if (preg_match('/^\d+-[^,]+$/', $uid)) { if (preg_match('/^\d+-[^,]+$/', $uid)) {
list($uid, $folder) = explode('-', $uid); list($uid, $folder) = explode('-', $uid, 2);
} }
// get cached headers // get cached headers
@ -1745,7 +1745,7 @@ class rcube_imap extends rcube_storage
// decode combined UID-folder identifier // decode combined UID-folder identifier
if (preg_match('/^\d+-[^,]+$/', $uid)) { if (preg_match('/^\d+-[^,]+$/', $uid)) {
list($uid, $folder) = explode('-', $uid); list($uid, $folder) = explode('-', $uid, 2);
} }
// Check internal cache // Check internal cache

@ -76,7 +76,7 @@ class rcube_message
{ {
// decode combined UID-folder identifier // decode combined UID-folder identifier
if (preg_match('/^\d+-[^,]+$/', $uid)) { if (preg_match('/^\d+-[^,]+$/', $uid)) {
list($uid, $folder) = explode('-', $uid); list($uid, $folder) = explode('-', $uid, 2);
} }
$this->uid = $uid; $this->uid = $uid;

@ -70,7 +70,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'])
// remove mbox part from _uid // remove mbox part from _uid
if (($_uid = get_input_value('_uid', RCUBE_INPUT_GPC)) && preg_match('/^\d+-[^,]+$/', $_uid)) { if (($_uid = get_input_value('_uid', RCUBE_INPUT_GPC)) && preg_match('/^\d+-[^,]+$/', $_uid)) {
list($_uid, $mbox) = explode('-', $_uid); list($_uid, $mbox) = explode('-', $_uid, 2);
if (isset($_GET['_uid'])) $_GET['_uid'] = $_uid; if (isset($_GET['_uid'])) $_GET['_uid'] = $_uid;
if (isset($_POST['_uid'])) $_POST['_uid'] = $_uid; if (isset($_POST['_uid'])) $_POST['_uid'] = $_uid;
$_REQUEST['_uid'] = $_uid; $_REQUEST['_uid'] = $_uid;

Loading…
Cancel
Save