From 3d3afeebd8d55034445c790ed53f3c9f786318b0 Mon Sep 17 00:00:00 2001 From: kink Date: Wed, 23 Oct 2002 12:52:30 +0000 Subject: [PATCH] strpos doesn't work if the offending char is in the first position... use substr_count git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3946 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/folders_create.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/folders_create.php b/src/folders_create.php index b847749c..d15927cb 100644 --- a/src/folders_create.php +++ b/src/folders_create.php @@ -38,11 +38,11 @@ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0 $folder_name = trim($folder_name); -if (strpos($folder_name, "\"") || strpos($folder_name, "\\") || - strpos($folder_name, "'") || strpos($folder_name, "$delimiter") || +if (substr_count($folder_name, "\"") || substr_count($folder_name, "\\") || + substr_count($folder_name, "'") || substr_count($folder_name, "$delimiter") || ($folder_name == '')) { displayPageHeader($color, 'None'); - echo ""; + plain_error_message(_("Illegal folder name. Please select a different name.")."
"._("Click here to go back").".", $color); sqimap_logout($imapConnection); exit; -- 2.25.1