From 31955c984edc93138173af5f592f58f50e39693d Mon Sep 17 00:00:00 2001 From: fidian Date: Tue, 16 Jan 2001 19:14:29 +0000 Subject: [PATCH 1/1] Fixed a bug where users that did not log in before would get tons of Warning: REG_EBRACK in .../imap_mailbox.php on line XXX Apparently the Trash and Sent folder need to be escaped, just in case they have some special characters in them. This only seemed to happen with FreeBSD and special folder names for the Sent and Trash folder. Thanks to John Bolster for helping out! git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@947 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 5916ae45..8e2600f0 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -258,14 +258,14 @@ // Then list special folders and their subfolders for ($i = 0 ; $i <= count($boxes) ; $i++) { - if((eregi("^".$trash_folder.'$', $boxes[$i]["unformatted"]) || - eregi("^".$trash_folder.quotemeta($dm), $boxes[$i]["unformatted"]) ) && + if((eregi("^".quotemeta($trash_folder).'$', $boxes[$i]["unformatted"]) || + eregi("^".quotemeta($trash_folder).quotemeta($dm), $boxes[$i]["unformatted"]) ) && ($move_to_trash)) { $boxesnew[] = $boxes[$i]; $boxes[$i]["used"] = true; } - else if((eregi("^".$sent_folder.'$', $boxes[$i]["unformatted"]) || - eregi("^".$sent_folder.quotemeta($dm), $boxes[$i]["unformatted"]) ) && + else if((eregi("^".quotemeta($sent_folder).'$', $boxes[$i]["unformatted"]) || + eregi("^".quotemeta($sent_folder).quotemeta($dm), $boxes[$i]["unformatted"]) ) && ($move_to_sent)) { $boxesnew[] = $boxes[$i]; $boxes[$i]["used"] = true; -- 2.25.1