[PATCH] Bug in 1.4.18: undefined variable: aSpamIds

Michal Hlavinka <[email protected]>
Newsgroups gmane.mail.squirrelmail.devel
Message-ID <[email protected]>
Hi,
we've found bug in squirrelmail/plugins/filters/filters.php causing :
Undefined variable: aSpamIds in 
/usr/share/squirrelmail/plugins/filters/filters.php on line 458

this prevents users from logging in.

Problem is in if (count($aSpamIds))... because this variable isn't initialized 
always.

We've used attached patch, which should fix this.

Regards,
Michal Hlavinka

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects

-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
squirrelmail.patch (text/x-patch, 599 B)
diff -up squirrelmail/plugins/filters/filters.php.orig squirrelmail/plugins/filters/filters.php
--- squirrelmail/plugins/filters/filters.php.orig	2009-05-19 08:38:20.756736040 +0200
+++ squirrelmail/plugins/filters/filters.php	2009-05-19 08:38:20.792605106 +0200
@@ -415,7 +415,7 @@ function spam_filters($imap_stream) {
     $messages = parseFetch($read, $search_array);
     
     $bulkquery = (strlen($SpamFilters_BulkQuery) > 0 ? true : false);
-
+    $aSpamIds = array();
     foreach($messages as $id=>$message) {
         if (isset($message['UID'])) {
             $MsgNum = $message['UID'];
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.