<?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>rename_sentmail_monthly doesdn&#039;t check for empty folder name</title> 
  <pubDate>Fri, 10 Apr 2026 06:34:49 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/4380</link> 
  <atom:link rel="self" type="application/rss+xml" title="rename_sentmail_monthly doesdn&#039;t check for empty folder name" href="https://bugs.horde.org/ticket/4380/rss" /> 
  <description>rename_sentmail_monthly doesdn&#039;t check for empty folder name</description> 
 
   
   
  <item> 
   <title>In lib/Identity/imp.php, the getAllSentmailfolders() functio</title> 
   <description>In lib/Identity/imp.php, the getAllSentmailfolders() function doesn&#039;t check for empty strings:



include_once &#039;Horde/Identity.php&#039;;

$identity = &amp;Identity::singleton(array(&#039;imp&#039;, &#039;imp&#039;));

$folder_list = $identity-&gt;getAllSentmailfolders();

var_dump($folder_list);



array(1) {

  [0]=&gt;

  string(0) &quot;&quot;

}



This especially becomes a problem with the rename_sentmail_monthly task. If a user has set the sent mail folder for an identity to &quot;None&quot;, they are prompted with this:



The current folder(s) &quot;&quot; will be renamed to &quot;&quot;.



If the user confirms the task, the resulting call to rename() effectively traverses the entire IMAP server. The rename() function searches for all folders matching $old . $namespace_info[&#039;delimiter&#039;] . &#039;*&#039;. If $old == &quot;&quot; and the delimiter is &#039;/&#039;, it results in a listing for &#039;/*&#039;. On a wu-imapd server, this causes a complete traversal of the IMAP server from the root filesystem.



Rather than try to rename an empty folder name, it seems like the correct behavior would be to catch empty strings in some/all of Identity_imp::getAllSentmailfolders(), IMP_Folder::rename(), and Maintenance_Task_rename_sentmail_monthly::doMaintenance().</description> 
   <pubDate>Mon, 04 Sep 2006 15:52:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/4380#t23725</link> 
  </item> 
   
  <item> 
   <title>Done in HEAD and FW_3 for getAllSentmailFolders() and IMP_Fo</title> 
   <description>Done in HEAD and FW_3 for getAllSentmailFolders() and IMP_Folder::rename().</description> 
   <pubDate>Tue, 05 Sep 2006 03:47:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/4380#t23739</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
