From 844d9c1adeaabe93653e51d57e2b942698b6514d Mon Sep 17 00:00:00 2001 From: fidian Date: Mon, 25 Jun 2001 17:32:08 +0000 Subject: [PATCH] Found this stuff when trying to figure out why I couldn't name a folder "Humor / Jokes" Turns out that this didn't quote any folder names, and the '/' is an illegal folder name character. Any ideas about the '/'? (Might be Courier specific) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1426 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/folders_rename_do.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/folders_rename_do.php b/src/folders_rename_do.php index 99324ca0..da76944a 100644 --- a/src/folders_rename_do.php +++ b/src/folders_rename_do.php @@ -34,8 +34,11 @@ else $newone = "$new_name"; - fputs ($imapConnection, ". RENAME \"$orig\" \"$newone\"\r\n"); - $data = sqimap_read_data($imapConnection, ".", true, $a, $b); + $cmd = "a024 RENAME \"" . quoteIMAP($orig) . "\" \"" . + quoteIMAP($newone) . "\"\r\n"; + echo htmlspecialchars($cmd) . "
\n"; + fputs ($imapConnection, $cmd); + $data = sqimap_read_data($imapConnection, "a024", true, $a, $b); // Renaming a folder doesn't renames the folder but leaves you unsubscribed // at least on Cyrus IMAP servers. @@ -46,7 +49,8 @@ sqimap_unsubscribe($imapConnection, $orig); sqimap_subscribe($imapConnection, $newone); - fputs ($imapConnection, "a001 LIST \"\" \"$newone*\"\r\n"); + fputs ($imapConnection, "a001 LIST \"\" \"" . quoteIMAP($newone) . + "*\"\r\n"); $data = sqimap_read_data($imapConnection, "a001", true, $a, $b); for ($i=0; $i < count($data); $i++) { -- 2.25.1