Trim folder name before creating/renaming, #511837
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 2 Feb 2002 17:44:21 +0000 (17:44 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 2 Feb 2002 17:44:21 +0000 (17:44 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2346 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/folders_create.php
src/folders_rename_do.php

index c0b4de4..a28e224 100644 (file)
@@ -19,6 +19,8 @@ require_once('../functions/display_messages.php');
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 global $delimiter;
 
+$folder_name = trim($folder_name);
+
 if (strpos($folder_name, "\"") || strpos($folder_name, "\\") ||
     strpos($folder_name, "'") || strpos($folder_name, "$delimiter")) {
     echo "<html><body bgcolor=$color[4]>";
index 8e03d83..79175d1 100644 (file)
@@ -17,6 +17,8 @@ global $delimiter, $base_uri;
 require_once('../src/validate.php');
 require_once('../functions/imap.php');
 
+$new_name = trim($new_name);
+
 if ($old_name <> $new_name) {
 
     $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);