Aleksander Machniak
2014-07-28 e1567419411fbd56a3f3ac5f0a805b1e345fa0cc
Fix bug where $Forwarded flag was being set even if server didn't support it (#1490000)
2 files modified
20 ■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap_generic.php 19 ●●●● patch | view | raw | blame | history
CHANGELOG
@@ -40,6 +40,7 @@
- Fix mbox files import
- Fix some mime-type to extension mapping checks in Installer (#1489983)
- Fix errors when using localStorage in Safari's private browsing mode (#1489996)
- Fix bug where $Forwarded flag was being set even if server didn't support it (#1490000)
RELEASE 1.0.2
-------------
program/lib/Roundcube/rcube_imap_generic.php
@@ -2028,10 +2028,6 @@
     */
    protected function modFlag($mailbox, $messages, $flag, $mod = '+')
    {
        if ($mod != '+' && $mod != '-') {
            $mod = '+';
        }
        if (!$this->select($mailbox)) {
            return false;
        }
@@ -2041,12 +2037,25 @@
            return false;
        }
        if ($this->flags[strtoupper($flag)]) {
            $flag = $this->flags[strtoupper($flag)];
        }
        if (!$flag || !in_array($flag, (array) $this->data['PERMANENTFLAGS'])
            || !in_array('\\*', (array) $this->data['PERMANENTFLAGS'])
        ) {
            return false;
        }
        // Clear internal status cache
        if ($flag == 'SEEN') {
            unset($this->data['STATUS:'.$mailbox]['UNSEEN']);
        }
        $flag   = $this->flags[strtoupper($flag)];
        if ($mod != '+' && $mod != '-') {
            $mod = '+';
        }
        $result = $this->execute('UID STORE', array(
            $this->compressMessageSet($messages), $mod . 'FLAGS.SILENT', "($flag)"),
            self::COMMAND_NORESPONSE);