Browse Source

fix some bugs found by grepping for urlencode/urldecode

Thijs Kinkhorst 18 năm trước cách đây
mục cha
commit
6462c7e3de
4 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 0 1
      functions/mime.php
  2. 1 1
      src/compose.php
  3. 1 1
      src/options_order.php
  4. 1 1
      src/redirect.php

+ 0 - 1
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 .= '<br />'._("The bodystructure provided by your IMAP server:").'<br /><br />';

+ 1 - 1
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;
         }

+ 1 - 1
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];
    }

+ 1 - 1
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);