[Tickets #6691] horde/kolab should also accept INBOX DOT(INBOX.) as IMAP folder name

bugs at horde.org bugs at horde.org
Mon May 12 15:48:16 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/6691
-----------------------------------------------------------------------
 Ticket             | 6691
 Created By         | noethen at uni-paderborn.de
 Summary            | horde/kolab should also accept INBOX DOT(INBOX.) as
IMAP folder name
 Queue              | Horde Base
 Version            | 3.2-RC4
 Type               | Bug
 State              | Unconfirmed
 Priority           | 2. Medium
 Milestone          |
 Patch              |
 Owners             |
-----------------------------------------------------------------------


noethen at uni-paderborn.de (2008-05-12 11:48) wrote:


In some functions like getOwner() in lib/Horde/Share/kolab.php
or lib/Horde/Kolab.php
or lib/Horde/Kolab/IMAP.php

the folder-name is checked against a regular Expression:

if (!preg_match(";(shared\.|INBOX[/]?|user/([^/]+)/)([^@]+)(@.*)?;",
$folder_path, $matches)

Some server are using "INBOX." and not "INBOX/". Would be great, if that
bug could be fixed.

function getOwner()
    {

        // PATCHED

        if
((!preg_match(";(shared\.|INBOX[/]?|user/([^/]+)/)([^@]+)(@.*)?;",
$this->get('folder'), $matches)) &&
(!preg_match(";(shared\.|INBOX[.]?|user\.([^.]+)\.)([^@]+)(@.*)?;",
$this->get('folder'), $matches)) ) {
                return PEAR::raiseError(sprintf(_("Owner of folder %s
cannot be determined."), $this->get('folder')));
        }

        if ((substr($matches[1], 0, 6) == 'INBOX/')|| (substr($matches[1],
0, 6) == 'INBOX.')) {
            return Auth::getAuth();
        } elseif ((substr($matches[1], 0, 5) == 'user/') ||
(substr($matches[1], 0, 5) == 'user.')) {
            $domain = strstr(Auth::getAuth(), '@');
            $user_domain = isset($matches[4]) ? $matches[4] : $domain;
            return $matches[2] . $user_domain;
        } elseif ($matches[1] == 'shared.') {
            return 'anonymous';
        }
    }






More information about the bugs mailing list