From 3bc714d503d53465083aaf325a649c6bd1bfc650 Mon Sep 17 00:00:00 2001 From: kink Date: Wed, 25 Feb 2004 14:25:49 +0000 Subject: [PATCH] Require whitespace in the LSUB before the mailbox name to prevent a subfolder called "foo.bar.inbox" to be treated as INBOX. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6661 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 865d9f36..8d5b957e 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -812,7 +812,7 @@ function sqimap_mailbox_tree($imap_stream) { $has_inbox = false; for ($i = 0, $cnt = count($lsub_ary); $i < $cnt; $i++) { - if (preg_match("/^\*\s+LSUB\s+(.*)\"?INBOX\"?[^(\/\.)].*$/i",$lsub_ary[$i])) { + if (preg_match("/^\*\s+LSUB\s+(.*)\s\"?INBOX\"?[^(\/\.)].*$/i",$lsub_ary[$i])) { $lsub_ary[$i] = strtoupper($lsub_ary[$i]); $has_inbox = true; break; -- 2.25.1