Quote dynamic regex contents to be safe. Thanks to Daniel Hahler.
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 5 Jan 2010 08:58:04 +0000 (08:58 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 5 Jan 2010 08:58:04 +0000 (08:58 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13882 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/folder_manip.php

index ee7b825b36b97e3c5e04374633c9ac807b408408..9ce94183fe87b7e8b19e488d7bfda29e7ea666a5 100644 (file)
@@ -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 */