]> git.donarmstrong.com Git - roundcube.git/commitdiff
Fix problem with some uuencoded attachments.
authorVincent Bernat <bernat@luffy.cx>
Sat, 29 Sep 2012 09:31:25 +0000 (11:31 +0200)
committerVincent Bernat <bernat@luffy.cx>
Sat, 29 Sep 2012 09:31:25 +0000 (11:31 +0200)
Patch from Michał Mirosław. Closes: #686857.

debian/changelog
debian/patches/series
debian/patches/uuencoded-attachments.patch [new file with mode: 0644]

index 3bbc2da060e3efa7fd6c840fdb61dba71e5c23dd..e3c6c4bd3632bbdd760a9f94cd0a270ec1ededba 100644 (file)
@@ -1,3 +1,10 @@
+roundcube (0.7.2-5) unstable; urgency=low
+
+  * Fix problem with some uuencoded attachments. Patch from Michał
+    Mirosław. Closes: #686857.
+
+ -- Vincent Bernat <bernat@debian.org>  Sat, 29 Sep 2012 11:30:04 +0200
+
 roundcube (0.7.2-4) unstable; urgency=high
 
   * Fix self XSS with plain signatures. CVE-2012-3508. Closes: #685475.
index 0897d8244a45f9b26a01962077c6289a6b4d2922..c6c2e9056c3158899ce6e3b95e4f9b20d2b648e1 100644 (file)
@@ -7,3 +7,4 @@ default-charset-utf8.patch
 debianize_password_plugin.patch
 use-debian-jquery-ui.patch
 cve-2012-3508.patch
+uuencoded-attachments.patch
diff --git a/debian/patches/uuencoded-attachments.patch b/debian/patches/uuencoded-attachments.patch
new file mode 100644 (file)
index 0000000..fb48aed
--- /dev/null
@@ -0,0 +1,21 @@
+Roundcube 0.7 doesn't properly recognize uuencoded attachments. Space
+(0x20) is a valid character to be found in uuencoded paragraphs while
+anything above backquote (0x60) is not valid.
+
+Source:
+ http://en.wikipedia.org/wiki/Uuencoding#Formatting_Mechanism
+
+Patch from Michał Mirosław.
+
+--- a/program/include/rcube_message.php.orig   2012-01-17 08:50:40.000000000 +0100
++++ a/program/include/rcube_message.php        2012-09-06 19:54:54.000000000 +0200
+@@ -622,8 +622,7 @@
+             $part->body = $this->imap->get_message_part($this->uid, $part->mime_id, $part);
+         $parts = array();
+-        // FIXME: line length is max.65?
+-        $uu_regexp = '/begin [0-7]{3,4} ([^\n]+)\n(([\x21-\x7E]{0,65}\n)+)`\nend/s';
++        $uu_regexp = '/begin [0-7]{3,4} ([^\n]+)\n(([\x20-\x60]{0,65}\n)+)`\nend/s';
+         if (preg_match_all($uu_regexp, $part->body, $matches, PREG_SET_ORDER)) {
+             // remove attachments bodies from the message body