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 88f4ab1..3445977 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 1a44f25..7be671f 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 02cbf19..29ed772 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 d305801..4db7733 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);