fix some bugs found by grepping for urlencode/urldecode
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 8 Jun 2007 20:14:37 +0000 (20:14 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 8 Jun 2007 20:14:37 +0000 (20:14 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12450 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php
src/compose.php
src/options_order.php
src/redirect.php

index 88f4ab14279be5286b3130b6c37684b259403356..344597742735f5469a9152815eaa100e803d8290 100644 (file)
@@ -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 .= '<br />'._("The bodystructure provided by your IMAP server:").'<br /><br />';
index 1a44f25bb9c2ff52a9e43a191ee428bc83724a13..7be671fa12b13b0346e2bd9d9328e991c47ff139 100644 (file)
@@ -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;
         }
index 02cbf19e66c7b94ced4cea55c50ac612b7a87e57..29ed772f7ed6d3a767cd8a91f59d165188730b85 100644 (file)
@@ -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];
    }
index d30580198c9dc6e84cf64afa5d3419f64232bbe5..4db7733b9718cdb2e40965fb695ec38c3824c457 100644 (file)
@@ -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);