Happy New Year
[squirrelmail.git] / functions / imap_messages.php
index 74a2448542e48d22739432351bd13cccfae71f4a..50f89836e40f95cba61d94ddc554b3d956f57fdf 100755 (executable)
@@ -6,7 +6,7 @@
  * This implements functions that manipulate messages
  * NOTE: Quite a few functions in this file are obsolete
  *
- * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @copyright 1999-2018 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -47,7 +47,6 @@ function sqimap_msgs_list_move($imap_stream, $id, $mailbox, $handle_errors = tru
     if ($source_mailbox!==false && $source_mailbox==$mailbox) {
         return false;
     }
-    $msgs_id = sqimap_message_list_squisher($id);
     if (sqimap_msgs_list_copy ($imap_stream, $id, $mailbox, $handle_errors)) {
         return sqimap_toggle_flag($imap_stream, $id, '\\Deleted', true, true);
     } else {
@@ -623,7 +622,7 @@ function parseFetch(&$aResponse,$aMessageList = array()) {
         $aMsg['ID'] = $id;
         $fetch = substr($read,$i_space+1,5);
         if (!is_numeric($id) && $fetch !== 'FETCH') {
-            $aMsg['ERROR'] = $read; // htmlspecialchars should be done just before display. this is backend code
+            $aMsg['ERROR'] = $read; // sm_encode_html_special_chars should be done just before display. this is backend code
             break;
         }
         $i = strpos($read,'(',$i_space+5);
@@ -896,7 +895,10 @@ function sqimap_parse_address($read, &$i) {
  */
 function sqimap_get_message($imap_stream, $id, $mailbox, $hide=0) {
     // typecast to int to prohibit 1:* msgs sets
-    $id = (int) $id;
+    // Update: $id should always be sanitized into a BIGINT so this
+    // is being removed; leaving this code here in case something goes
+    // wrong, however
+    //$id = (int) $id;
     $flags = array();
     $read = sqimap_run_command($imap_stream, "FETCH $id (FLAGS BODYSTRUCTURE)", true, $response, $message, TRUE);
     if ($read) {