6.0.0-alpha14
7/2/25

[#9565] Imap_Client fails with literal data on setMetadata command
Summary Imap_Client fails with literal data on setMetadata command
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester wrobel (at) horde (dot) org
Created 02/05/2011 (5261 days ago)
Due
Updated 02/09/2011 (5257 days ago)
Assigned 02/08/2011 (5258 days ago)
Resolved 02/09/2011 (5257 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
02/09/2011 08:05:40 PM Gunnar Wrobel State ⇒ Resolved
 
02/09/2011 08:05:08 PM Gunnar Wrobel Comment #8 Reply to this comment
  This should be fixed (for real this time).
Confirmed :) Thanks a lot!
02/09/2011 06:15:49 PM Git Commit Comment #7 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9565: Need to send CRLF after literalplus request

http://git.horde.org/horde-git/-/commit/67ab4d8fe94d3387d9d7f708a6735ebecfedcbaa
02/09/2011 05:54:36 PM Michael Slusarz Comment #6 Reply to this comment
This is correct.  Forgot that the 8-bit character counts as 2 octets:
DEBUG: C: A0002 SETANNOTATION INBOX "/comment" ("value.shared" {2+}
DEBUG: C: Ä)
DEBUG: S: A0002 OK Completed
This is incorrect:
DEBUG: C: A0002 SETANNOTATION INBOX "/comment" ("value.shared" {2+}
DEBUG: C: Ä
DEBUG: C: )
DEBUG: S: A0002 OK Completed
The IMAP client code was properly outputting literal data when that 
data was being stored internally in a stream.  However, when the 
literal data was stored internally in a string, we were tacking on a 
CRLF after the literal data.  This was terminating the command early.   
This should be fixed (for real this time).
02/09/2011 05:52:24 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9565: Never send CRLF after literal

http://git.horde.org/horde-git/-/commit/0ee34548ff77cfabdb68bdb5c88832072e97bb05
02/09/2011 07:05:09 AM Gunnar Wrobel Comment #4 Reply to this comment

[Show Quoted Text - 12 lines]
Hm, looks like that after your last commit now. The server is still 
unhappy though:

(1297234921.0173) C: 2 SETANNOTATION INBOX "/comment" ("value.shared" {2+}
(1297234921.0177) C: Ä
(1297234921.0180) C: )
(1297234921.3045) S: 2 BAD Missing close paren in annotation 
attribute-values list

[Show Quoted Text - 25 lines]
02/08/2011 11:39:26 PM Gunnar Wrobel Comment #3 Reply to this comment

[Show Quoted Text - 15 lines]
Ah, okay. The above command I posted was generated by the roundcube 
IMAP driver and I just copied it. The server apparently did not care 
about the misplaced parenthesis.
This has been fixed (I think; don't have an easy way to test at the moment):
It fails with

(1297208022.0143) C: 2 SETANNOTATION
(1297208022.1472) S: 2 BAD Missing required argument to Setannotation

now. Testing is easy on my side as this just requires a short command 
line call. If you need more info just tell me. Thanks for 
investigating this!
http://lists.horde.org/archives/commits/2011-February/006677.html

It also looked like the 'SETMETADATA' method was also broken - this 
should be fixed also.
02/08/2011 04:59:14 PM Michael Slusarz Comment #2
State ⇒ Feedback
Taken from Gunnar Wrobel
Reply to this comment
Working output would be:

DEBUG: C: A0002 SETANNOTATION INBOX "/comment" ("value.shared" {2+}
DEBUG: C: Ä)
DEBUG: S: A0002 OK Completed
This is incorrect also.  This should be:

DEBUG: C: A0002 SETANNOTATION INBOX "/comment" ("value.shared" {2+}
DEBUG: C: Ä
DEBUG: C: )
DEBUG: S: A0002 OK Completed

The ')' is part of the IMAP command, not the literal, so it needs to 
appear on a new line.

This has been fixed (I think; don't have an easy way to test at the moment):
http://lists.horde.org/archives/commits/2011-February/006677.html

It also looked like the 'SETMETADATA' method was also broken - this 
should be fixed also.
02/05/2011 10:27:34 PM Gunnar Wrobel Assigned to Gunnar Wrobel
Assigned to Michael Slusarz
 
02/05/2011 10:27:15 PM Gunnar Wrobel Comment #1
Milestone ⇒
State ⇒ Unconfirmed
Patch ⇒ No
Queue ⇒ Horde Framework Packages
Summary ⇒ Imap_Client fails with literal data on setMetadata command
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
When using the setMetadata() method and trying to set the /comment 
value to "Ä" the generated IMAP output is incorrect:

C: 2 SETANNOTATION INBOX ("/comment" ("value.shared" {2+}
C: Ä
C: ))
S: 2 BAD Missing close paren in annotation attribute-values list

Working output would be:

DEBUG: C: A0002 SETANNOTATION INBOX "/comment" ("value.shared" {2+}
DEBUG: C: Ä)
DEBUG: S: A0002 OK Completed

I currently lacked the time to further investigate this but I can do 
so at a later time.Unless of course it is something totally trivial 
for Micheal :)

Saved Queries