Ce jour Thu, Aug 07, 2003 at 10:59:17AM -0400, Josep L. Guallar-Esteve �crit :
> Hi,
>
> Since I moved to SM-1.4.1, a few of my users are getting errors like this one:
>
> ERROR:
> ERROR : Bad or malformed request.
> Query: FETCH (FLAGS UID RFC822.SIZE INTERNALDATE BODY.PEEK[HEADER.FIELDS (Date
> To Cc From Subject X-Priority Content-Type)])
> Server responded: Bogus sequence in UID FETCH
>
> This error shows up right after the user logs ininstead of the INBOX list of
> emails.
>
> Any idea?
Assuming you're using uw-imap, with server side thread and/or sort, then you
should either grab a 1.4.2 or apply the attached patches against the 1.4.1
functions/imap_messages.php
Good luck,
Alex.
Index: imap_messages.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/imap_messages.php,v
retrieving revision 1.134.2.3
retrieving revision 1.134.2.5
diff -u -r1.134.2.3 -r1.134.2.5
--- imap_messages.php 29 Jun 2003 20:20:52 -0000 1.134.2.3
+++ imap_messages.php 18 Jul 2003 11:24:32 -0000 1.134.2.5
@@ -352,9 +352,12 @@
$query = "THREAD $sort_type ".strtoupper($default_charset)." ALL";
$thread_test = sqimap_run_command ($imap_stream, $query, true, $response,
$message, $uid_support);
if (isset($thread_test[0])) {
- if (preg_match("/^\* THREAD (.+)$/", $thread_test[0], $regs)) {
- $thread_list = trim($regs[1]);
- }
+ for ($i=0,$iCnt=count($thread_test);$i<$iCnt;++$i) {
+ if (preg_match("/^\* THREAD (.+)$/", $thread_test[$i], $regs)) {
+ $thread_list = trim($regs[1]);
+ break;
+ }
+ }
}
else {
$thread_list = "";
Index: imap_messages.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/imap_messages.php,v
retrieving revision 1.134.2.5
retrieving revision 1.134.2.6
diff -u -r1.134.2.5 -r1.134.2.6
--- imap_messages.php 18 Jul 2003 11:24:32 -0000 1.134.2.5
+++ imap_messages.php 29 Jul 2003 23:57:35 -0000 1.134.2.6
@@ -181,9 +181,12 @@
$sort_test = sqimap_run_command ($imap_stream, $query, true, $response,
$message, $uid_support);
}
if (isset($sort_test[0])) {
- if (preg_match("/^\* SORT (.+)$/", $sort_test[0], $regs)) {
+ for ($i=0,$iCnt=count($sort_test);$i<$iCnt;++$i) {
+ if (preg_match("/^\* SORT (.+)$/", $sort_test[$i], $regs)) {
$server_sort_array = preg_split("/ /", trim($regs[1]));
+ break;
}
+ }
}
if ($sort == 0 || $sort == 2 || $sort == 4) {
$server_sort_array = array_reverse($server_sort_array);