Subject: Silly bug in imap-2002d. Still in?

From: Peter Stuge <[email-masked]>
Date: Thu, 26 Feb 2004 02:16:36 +0100

Hi!

Sorry if this is already known, but 2002d was the latest version when I
needed it. I see 2002e and 2004.RC1 has been released since.

When the PHP imap extension function imap_clearflag_full()
(http://php.net/imap_clearflag_full - it calls mail_clearflag_full())
is called with an empty sequence, c-client sends invalid IMAP to the
server, and becomes quite disappointed when the server replies with an
error message. (c-client stops responding completely.)

A customer originally discovered this when trying to delete messages in
V-webmail, which uses the PHP IMAP extension. I fixed it in PHP by
validating the sequence before actually calling the IMAP extension,
but should of course be fixed in c-client if it hasn't been already.

< 00000008 UID STORE  -Flags (\Deleted)
> * BAD Syntax error: Expected Set

after this, nothing more happens.

//Peter
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Wed, 25 Feb 2004 17:26:56 -0800 (Pacific Standard Time)

As with other APIs, c-client does not check for all possible silly 
arguments that an application can give it.  The correct fix is what you 
did; make sure that you only call the API with valid arguments.

> after this, nothing more happens.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

---

From: Peter Stuge <[email-masked]>
Date: Thu, 26 Feb 2004 02:35:46 +0100

> did; make sure that you only call the API with valid arguments.

Hm. I'll agree that the library shouldn't have to parse the IMAP, but
either way it shouldn't stop responding because of the protocol error,
IMHO of course. :)

//Peter

---

From: Mark Crispin <[email-masked]>
Date: Wed, 25 Feb 2004 17:44:05 -0800 (Pacific Standard Time)

> either way it shouldn't stop responding because of the protocol error,

How does it "stop responding"?

I tried an empty sequence and it returns properly after issuing the error.

-- Mark --