Prevent session lock-up caused by filters plugin trying to move messages in an accoun...
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 1 Aug 2014 02:28:12 +0000 (02:28 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 1 Aug 2014 02:28:12 +0000 (02:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14474 7612ce4b-ef26-0410-bec9-ea0150e637f0

doc/ChangeLog
plugins/filters/filters.php

index efb3074ceb8760a624f9b7e49fd676c5bcbe10c8..8e3d5cde94a485994448be545a8ae1d56a4e473e 100644 (file)
@@ -393,6 +393,8 @@ Version 1.5.2 - SVN
     file or "4.  General Options ==> 21. Display login error from IMAP" 
     in the configuration tool.
   - Configuration tool now shows the SquirrelMail version
+  - Prevent session lock-up caused by filters plugin trying to move
+    messages in an account that is over quota.
 
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------
index ed96ed8179ca7e56960209b808c31d0ca1944281..604fd10b6ff91a0af91b20b9a1d5859f9778ede1 100644 (file)
@@ -197,8 +197,19 @@ function start_filters($hook_args) {
 
     // if there were filtering errors previously during
     // this login session, we won't try again
+    //
+    // (errors that this plugin was able to catch or a "NO"
+    // response/failure from IMAP found in the current session,
+    // which could have resulted from an attempted filter copy
+    // (over quota), in which case execution halts before this
+    // plugin can catch the problem -- note, however, that any
+    // other IMAP "NO" failure (caused by unrelated actions) at
+    // any time during the current session will cause this plugin
+    // to effectively shut down)
+    //
     sqgetGlobalVar('filters_error', $filters_error, SQ_SESSION, FALSE);
-    if ($filters_error)
+    sqgetGlobalVar('IMAP_FATAL_ERROR_TYPE', $imap_fatal_error, SQ_SESSION, '');
+    if ($filters_error || $imap_fatal_error == 'NO')
         return;
 
     /**