]> git.donarmstrong.com Git - roundcube.git/blob - debian/patches/uuencoded-attachments.patch
Refresh all patches.
[roundcube.git] / debian / patches / uuencoded-attachments.patch
1 Roundcube 0.7 doesn't properly recognize uuencoded attachments. Space
2 (0x20) is a valid character to be found in uuencoded paragraphs while
3 anything above backquote (0x60) is not valid.
4
5 Source:
6  http://en.wikipedia.org/wiki/Uuencoding#Formatting_Mechanism
7
8 Patch from Michał Mirosław.
9
10 Index: roundcube/program/include/rcube_message.php
11 ===================================================================
12 --- roundcube.orig/program/include/rcube_message.php    2012-09-29 11:30:54.555045159 +0200
13 +++ roundcube/program/include/rcube_message.php 2012-09-29 11:31:51.044174849 +0200
14 @@ -622,8 +622,7 @@
15              $part->body = $this->imap->get_message_part($this->uid, $part->mime_id, $part);
16  
17          $parts = array();
18 -        // FIXME: line length is max.65?
19 -        $uu_regexp = '/begin [0-7]{3,4} ([^\n]+)\n(([\x21-\x7E]{0,65}\n)+)`\nend/s';
20 +        $uu_regexp = '/begin [0-7]{3,4} ([^\n]+)\n(([\x20-\x60]{0,65}\n)+)`\nend/s';
21  
22          if (preg_match_all($uu_regexp, $part->body, $matches, PREG_SET_ORDER)) {
23              // remove attachments bodies from the message body