Преглед изворни кода

fixing multiline headers. space or tab should not be removed.
tab is replaced by space, because it is later used split decoded string into chunks

tokul пре 21 година
родитељ
комит
2cea5ee40c
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      class/mime/Rfc822Header.class.php
  2. 1 1
      functions/imap_messages.php

+ 1 - 1
class/mime/Rfc822Header.class.php

@@ -44,7 +44,7 @@ class Rfc822Header {
             $hdr = implode('', $hdr);
             $hdr = implode('', $hdr);
         }
         }
         /* First we unfold the header */
         /* First we unfold the header */
-        $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array('', ''), $hdr));
+        $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array(' ', ' '), $hdr));
 
 
         /* Now we can make a new header array with */
         /* Now we can make a new header array with */
         /* each element representing a headerline  */
         /* each element representing a headerline  */

+ 1 - 1
functions/imap_messages.php

@@ -621,7 +621,7 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list, $show_num=false)
                 $header = parseString($read,$i);
                 $header = parseString($read,$i);
                 if ($header === false) break 3;
                 if ($header === false) break 3;
                 /* First we unfold the header */
                 /* First we unfold the header */
-                $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array('', ''), $header));
+                $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array(' ', ' '), $header));
                 /* Now we can make a new header array with */
                 /* Now we can make a new header array with */
                 /* each element representing a headerline  */
                 /* each element representing a headerline  */
                 $hdr = explode("\r\n" , $hdr);
                 $hdr = explode("\r\n" , $hdr);