From 9a19cc66bafe1461c2f0b3b89518b882d0edc940 Mon Sep 17 00:00:00 2001 From: kink Date: Fri, 8 Jun 2007 20:14:37 +0000 Subject: [PATCH] fix some bugs found by grepping for urlencode/urldecode git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12450 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 1 - src/compose.php | 2 +- src/options_order.php | 2 +- src/redirect.php | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index 88f4ab14..34459774 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -60,7 +60,6 @@ function mime_structure ($bodystructure, $flags=array()) { if (!is_object($msg)) { global $color, $mailbox; - /* removed urldecode because $_GET is auto urldecoded ??? */ displayPageHeader( $color, $mailbox ); $errormessage = _("SquirrelMail could not decode the bodystructure of the message"); $errormessage .= '
'._("The bodystructure provided by your IMAP server:").'

'; diff --git a/src/compose.php b/src/compose.php index 1a44f25b..7be671fa 100644 --- a/src/compose.php +++ b/src/compose.php @@ -458,7 +458,7 @@ if ($send) { /* We entered compose via the search results page */ $mailbox = 'INBOX'; /* Send 'em to INBOX, that's safe enough */ } - $urlMailbox = urlencode (trim($mailbox)); + $urlMailbox = urlencode($mailbox); if (! isset($passed_id)) { $passed_id = 0; } diff --git a/src/options_order.php b/src/options_order.php index 02cbf19e..29ed772f 100644 --- a/src/options_order.php +++ b/src/options_order.php @@ -43,7 +43,7 @@ if (!sqgetGlobalVar('account', $account, SQ_GET)) { } if (sqgetGlobalVar('mailbox', $mailbox, SQ_GET)) { - $aMailboxPrefs = unserialize(getPref($data_dir, $username, "pref_".$iAccount.'_'.urldecode($mailbox))); + $aMailboxPrefs = unserialize(getPref($data_dir, $username, "pref_".$iAccount.'_'.$mailbox)); if (isset($aMailboxPrefs[MBX_PREF_COLUMNS])) { $index_order = $aMailboxPrefs[MBX_PREF_COLUMNS]; } diff --git a/src/redirect.php b/src/redirect.php index d3058019..4db7733b 100644 --- a/src/redirect.php +++ b/src/redirect.php @@ -151,7 +151,7 @@ if ( sqgetGlobalVar('session_expired_location', $session_expired_location, SQ_SE // of the last page $redirect_url = $session_expired_location; } else { - $redirect_url = $location.'/webmail.php?right_frame='.urldecode($session_expired_location); + $redirect_url = $location.'/webmail.php?right_frame='.urlencode($session_expired_location); } } unset($session_expired_location); -- 2.25.1