Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: pu
Hi stable release team,
The version of ruby-tmail currently in Wheezy (1.2.7.1-3) contains a
regression in the way unquoted attachment filenames are parsed
(#706117). This makes Schleuder error out on some emails that used to
work perfectly fine in Squeeze.
As this is an important regression for Schleuder users, I would like to
see this issue fixed in stable. The patch fixing the issue is itself
a one-liner, but it also adds to extra tests to ensure that it works as
it should and does not break anything else.
Thanks,
--
Jérémy Bobbio .''`.
lunar@debian.org : :Ⓐ : # apt-get install anarchism
`. `'`
`-
diff -Nru ruby-tmail-1.2.7.1/debian/changelog ruby-tmail-1.2.7.1/debian/changelog
--- ruby-tmail-1.2.7.1/debian/changelog 2012-10-27 00:53:46.000000000 +0200
+++ ruby-tmail-1.2.7.1/debian/changelog 2013-05-14 11:58:28.000000000 +0200
@@ -1,3 +1,10 @@
+ruby-tmail (1.2.7.1-3deb7u1) stable; urgency=low
+
+ * Add debian/patches/0004-fix-parsing-of-unquoted-attachment-filenames.patch:
+ restore proper parsing of unquoted attachment filenames. (Closes: #706117)
+
+ -- Jérémy Bobbio <lunar@debian.org> Tue, 14 May 2013 11:55:49 +0200
+
ruby-tmail (1.2.7.1-3) unstable; urgency=medium
* Team upload
diff -Nru ruby-tmail-1.2.7.1/debian/patches/0004-fix-parsing-of-unquoted-attachment-filenames.patch ruby-tmail-1.2.7.1/debian/patches/0004-fix-parsing-of-unquoted-attachment-filenames.patch
--- ruby-tmail-1.2.7.1/debian/patches/0004-fix-parsing-of-unquoted-attachment-filenames.patch 1970-01-01 01:00:00.000000000 +0100
+++ ruby-tmail-1.2.7.1/debian/patches/0004-fix-parsing-of-unquoted-attachment-filenames.patch 2013-05-14 11:58:28.000000000 +0200
@@ -0,0 +1,59 @@
+Description: Fix parsing of unquoted attachment filenames
+ Upstream commit d3f1d826 introduced a problem when parsing Content-Disposition
+ headers with unquoted filenames.
+Author: Jérémy Bobbio <lunar@debian.org>
+Last-Update: 2013-04-24
+
+ lib/tmail/utils.rb | 2 +-
+ test/test_attachments.rb | 1 +
+ test/test_mail.rb | 11 +++++++++++
+ 3 files changed, 13 insertions(+), 1 deletions(-)
+
+diff --git a/lib/tmail/utils.rb b/lib/tmail/utils.rb
+index 68e5898..5c395d3 100644
+--- a/lib/tmail/utils.rb
++++ b/lib/tmail/utils.rb
+@@ -350,7 +350,7 @@ module TMail
+ head, should_quoted, tail = $~.captures
+ # head: "; name="
+ # should_quoted: "=?ISO-2022-JP?B?...=?="
+- head << quote_token(should_quoted) << tail
++ head << quote_token(should_quoted.strip) << tail
+ }
+ end
+
+diff --git a/test/test_attachments.rb b/test/test_attachments.rb
+index 86dcb40..72f53d0 100644
+--- a/test/test_attachments.rb
++++ b/test/test_attachments.rb
+@@ -79,6 +79,7 @@ HERE
+ fixture = File.read(File.dirname(__FILE__) + "/fixtures/unquoted_filename_in_attachment")
+ mail = TMail::Mail.parse(fixture)
+ assert_equal("image/png", mail.attachments.first.content_type)
++ assert_equal("Picture 7.png", mail.attachments.first.original_filename)
+ end
+
+ def test_unquoted_apple_mail_content_type
+diff --git a/test/test_mail.rb b/test/test_mail.rb
+index b63f497..52f26da 100644
+--- a/test/test_mail.rb
++++ b/test/test_mail.rb
+@@ -530,6 +530,17 @@ EOF
+ assert_equal(output, mail.to_s)
+ end
+
++ def test_mail_to_s_with_unquoted_filename
++ msg = <<EOF
++From: mikel@example.com
++Subject: =?utf-8?Q?testing_testing_=D6=A4?=
++Content-Disposition: attachment; filename=README.txt.pif
++
++The body
++EOF
++ assert_equal(msg, TMail::Mail.parse(msg).to_s)
++ end
++
+ def test_mail_to_s_with_filename_discards_quotes_as_needed
+ msg = <<EOF
+ From: mikel@example.com
+--
diff -Nru ruby-tmail-1.2.7.1/debian/patches/series ruby-tmail-1.2.7.1/debian/patches/series
--- ruby-tmail-1.2.7.1/debian/patches/series 2012-10-07 21:49:50.000000000 +0200
+++ ruby-tmail-1.2.7.1/debian/patches/series 2013-05-14 11:58:28.000000000 +0200
@@ -1,3 +1,4 @@
0001-use_system_rchardet_library.patch
0002-include_is_binary_data_definition.patch
0003-deactivate_faulty_test.patch
+0004-fix-parsing-of-unquoted-attachment-filenames.patch
Attachment:
signature.asc
Description: Digital signature