Просмотр исходного кода

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 лет назад
Родитель
Сommit
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);
         }
         /* 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 */
         /* 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);
                 if ($header === false) break 3;
                 /* 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 */
                 /* each element representing a headerline  */
                 $hdr = explode("\r\n" , $hdr);