From: pdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Date: Fri, 1 Aug 2014 02:28:12 +0000 (+0000)
Subject: Prevent session lock-up caused by filters plugin trying to move messages in an accoun... 
X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e63aa8ccb0ced5d015f2b48207a2cc134a7060c6;p=squirrelmail.git

Prevent session lock-up caused by filters plugin trying to move messages in an account that is over quota

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14474 7612ce4b-ef26-0410-bec9-ea0150e637f0
---

diff --git a/doc/ChangeLog b/doc/ChangeLog
index efb3074c..8e3d5cde 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -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)
 --------------------------------------
diff --git a/plugins/filters/filters.php b/plugins/filters/filters.php
index ed96ed81..604fd10b 100644
--- a/plugins/filters/filters.php
+++ b/plugins/filters/filters.php
@@ -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;
 
     /**