<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>log in when the username contains spaces</title> 
  <pubDate>Fri, 10 Apr 2026 16:31:14 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/3778</link> 
  <atom:link rel="self" type="application/rss+xml" title="log in when the username contains spaces" href="https://bugs.horde.org/ticket/3778/rss" /> 
  <description>log in when the username contains spaces</description> 
 
   
   
  <item> 
   <title>Hello,

The Cyrus Imap server permits usernames (mailboxes) </title> 
   <description>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 = &#039;&quot;&#039;. $username . &#039;&quot;&#039;;

to imp-4.1.1/lib/IMAP/Client.php:login($usrname) (put it on line 470).</description> 
   <pubDate>Sun, 16 Apr 2006 18:47:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3778#t19011</link> 
  </item> 
   
  <item> 
   <title>Fixed in HEAD and IMP 4.1.2.



However, as noted in the com</title> 
   <description>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&#039;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&#039;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&#039;t be critical because I don&#039;t know of a single IMAP server or OS that allows double quotes in a username.  But theoretically this is possible.</description> 
   <pubDate>Mon, 17 Apr 2006 15:51:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3778#t19026</link> 
  </item> 
   
  <item> 
   <title>In the second example, this line:

   a001 login {e}

should</title> 
   <description>In the second example, this line:

   a001 login {e}

should obviously read:

   a001 login {3}</description> 
   <pubDate>Mon, 17 Apr 2006 16:00:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3778#t19030</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
