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 |
a001 login {e}
should obviously read:
a001 login {3}
State ⇒ Resolved
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.
State ⇒ Assigned
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ log in when the username contains spaces
Queue ⇒ IMP
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).