From: pdontthink Date: Tue, 5 Jan 2010 08:58:04 +0000 (+0000) Subject: Quote dynamic regex contents to be safe. Thanks to Daniel Hahler. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d8e94f0ae6733ca565035a93704d71de69b9f2e3;p=squirrelmail.git Quote dynamic regex contents to be safe. Thanks to Daniel Hahler. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13882 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/folder_manip.php b/functions/folder_manip.php index ee7b825b..9ce94183 100644 --- a/functions/folder_manip.php +++ b/functions/folder_manip.php @@ -226,7 +226,7 @@ function folders_delete_do ($imapConnection, $delimiter, $folder_name) /** lets see if we CAN move folders to the trash.. otherwise, ** just delete them **/ - if ($delete_folder || preg_match('/^' . $trash_folder . '.+/i', $folder_name) ) { + if ($delete_folder || preg_match('/^' . preg_quote($trash_folder, '/') . '.+/i', $folder_name) ) { $can_move_to_trash = FALSE; } else { /* Otherwise, check if trash folder exits and support sub-folders */