6.0.0-beta1
9/24/25

[#3778] log in when the username contains spaces
Summary log in when the username contains spaces
Queue IMP
Queue Version 4.1.1
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester dilyan.palauzov (at) aegee (dot) org
Created 04/16/2006 (7101 days ago)
Due
Updated 04/17/2006 (7100 days ago)
Assigned 04/17/2006 (7100 days ago)
Resolved 04/17/2006 (7100 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/17/2006 04:00:15 PM Michael Slusarz Comment #3 Reply to this comment
In the second example, this line:

    a001 login {e}

should obviously read:

    a001 login {3}
04/17/2006 03:51:59 PM Michael Slusarz Comment #2
State ⇒ Resolved
Reply to this comment
Fixed in HEAD and IMP 4.1.2.



However, as noted in the comments in the code:

We should use a literal string to send the username, but some

IMAP servers don't support a literal string request inside of a

literal string. Thus, use a quoted string for the username

(which should probably be OK since it is very unlikely a

username will include a double-quote character).



i.e. we should be doing this:



a001 LOGIN {3}

+ OK

foo {3}

+ OK

bar



but certain IMAP implementations (i.e. up-imapproxy) don't support this:



a001 login {e}

+ go ahead

foo {3}

a001 NO LOGIN failed



Literal string requests MUST (per RFC 3501) be honored inside of a 
literal string itself.  up-imapproxy is broken and needs to be fixed.   
I am going to send the devs a message and let them know about this.   
As stated above, this shouldn't be critical because I don't know of a 
single IMAP server or OS that allows double quotes in a username.  But 
theoretically this is possible.
04/17/2006 01:25:28 AM Chuck Hagenbuch Assigned to Michael Slusarz
State ⇒ Assigned
 
04/16/2006 06:47:50 PM dilyan (dot) palauzov (at) aegee (dot) org Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ log in when the username contains spaces
Queue ⇒ IMP
Reply to this comment
Hello,

The Cyrus Imap server permits usernames (mailboxes) to contain spaces, 
bu in order to make use of them in the A001 login command, the 
username has to be quoted. However imp/lib/IMAP/Client.php does not 
quote the user name and trying to enter IMP with user name X Y and 
password Z generates the command

   A001 login X Y Z

which obviously has three parameters instead of two. Thefore I would 
like to ask you to quote the username before passing it to the 
IMAP-server, e.g. by prepending

    $username = '"'. $username . '"';

to imp-4.1.1/lib/IMAP/Client.php:login($usrname) (put it on line 470).

Saved Queries