Changeset 3885 in subversion
- Timestamp:
- Aug 9, 2010 9:30:17 AM (3 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 2 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_imap.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r3879 r3885 1 1 CHANGELOG RoundCube Webmail 2 2 =========================== 3 4 - Improve handling of single-part messages with bogus BODYSTRUCTURE (#1486898) 3 5 4 6 RELEASE 0.4 -
trunk/roundcubemail/program/include/rcube_imap.php
r3843 r3885 1705 1705 $this->struct_charset = $this->_structure_charset($structure); 1706 1706 1707 $headers->ctype = strtolower($headers->ctype); 1708 1707 1709 // Here we can recognize malformed BODYSTRUCTURE and 1708 1710 // 1. [@TODO] parse the message in other way to create our own message structure 1709 1711 // 2. or just show the raw message body. 1710 1712 // Example of structure for malformed MIME message: 1711 // ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 2154 70 NIL NIL NIL) 1712 if ($headers->ctype && $headers->ctype != 'text/plain' 1713 && $structure[0] == 'text' && $structure[1] == 'plain') { 1714 return false; 1713 // ("text" "plain" NIL NIL NIL "7bit" 2154 70 NIL NIL NIL) 1714 if ($headers->ctype && !is_array($structure[0]) && $headers->ctype != 'text/plain' 1715 && strtolower($structure[0].'/'.$structure[1]) == 'text/plain') { 1716 // we can handle single-part messages, by simple fix in structure (#1486898) 1717 if (preg_match('/^(text|application)\/(.*)/i', $headers->ctype, $m)) { 1718 $structure[0] = $m[1]; 1719 $structure[1] = $m[2]; 1720 } 1721 else 1722 return false; 1715 1723 } 1716 1724
Note: See TracChangeset
for help on using the changeset viewer.
