Quellcode durchsuchen

Require whitespace in the LSUB before the mailbox name to prevent a
subfolder called "foo.bar.inbox" to be treated as INBOX.

Thijs Kinkhorst vor 21 Jahren
Ursprung
Commit
b7c512df9a
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      functions/imap_mailbox.php

+ 1 - 1
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;