From 10359c65c4610598f8d003745adf24b0364c0894 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Wed, 6 Dec 2000 15:23:27 +0000 Subject: [PATCH] - added patch from srakhada that uses quotemeta() function around password to allow special characters in password. - added patch from dave_michmerhuizen@yahoo.com to do folder sorting with case insensativity git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@870 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 1 + functions/imap_mailbox.php | 10 +++++++++- src/webmail.php | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf1edfb5..3387a8ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ Version 1.0pre1 -- DEVELOPMENT ------------------------------ +- Folder sorting now case insensative - added config option to set IMAP folder delimiter rather than always detecting it - Made session cookie parameter use PHP's settings rather than making assumptions - Select/Deslect all implemented using only HTML (not Javascript) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 48bd446c..0d966cd7 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -140,6 +140,13 @@ } return $boxes; } + + /* patch from dave_michmerhuizen@yahoo.com + * allows case insensativity when sorting folders + */ + function _icmp ($a, $b) { + return strcasecmp($a, $b); + } /****************************************************************************** ** Returns sorted mailbox lists in several different ways. @@ -177,7 +184,8 @@ } $sorted_lsub_ary = $new_ary; if (isset($sorted_lsub_ary)) { - sort($sorted_lsub_ary); + usort($sorted_lsub_ary, "_icmp"); + //sort($sorted_lsub_ary); } /** LIST array **/ diff --git a/src/webmail.php b/src/webmail.php index 89811e01..bb6df91e 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -54,7 +54,7 @@ do_hook ("login_before"); $onetimepad = OneTimePadCreate(strlen($secretkey)); - $key = OneTimePadEncrypt($secretkey, $onetimepad); + $key = OneTimePadEncrypt(quotemeta($secretkey), $onetimepad); session_register("onetimepad"); // verify that username and password are correct $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); -- 2.25.1