Package: enigmail
Version: 2:1.5.0+id17-1
Severity: normal
Tags: upstream patch
Control: forwarded -1 
https://lists.enigmail.net/pipermail/enigmail-users_enigmail.net/2013-January/000437.html

enigmail appears to truncate the last line when displaying decrypted
some PGP/MIME messages.

This was reported to upstream, and is fixed in their repo, but hasn't
made it into any released version yet.

The upstream patch (modified for our build layout) is attached below.
I've tested it and it resolves the problem.

If you have no objections, i'll fold it into the pkg-mozext/enigmail
experimental branch (thanks for publishing the git repo!).  i'm happy
to add myself to uploaders if you'd like, and to do the upload.

Thanks for maintaining enigmail!

   --dkg

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages enigmail depends on:
ii  gnupg       1.4.12-7
ii  icedove     17.0-1
ii  libc6       2.13-37
ii  libgcc1     1:4.7.2-4
ii  libnspr4    2:4.9.2-1
ii  libstdc++6  4.7.2-4

enigmail recommends no packages.

enigmail suggests no packages.

-- no debconf information
commit 073a8f491f8707458a4e7ac80a8f8d5743eb57b9
Author: Patrick Brunschwig <[email protected]>
Date:   Thu Jan 3 18:00:43 2013 +0100

    ensure CRLF at end of last line (Bug reported by Olav from AppleMail)

diff --git a/package/mimeDecrypt.js b/package/mimeDecrypt.js
index f92b2f1..c9e5e68 100644
--- a/extensions/enigmail/package/mimeDecrypt.js
+++ b/extensions/enigmail/package/mimeDecrypt.js
@@ -249,6 +249,11 @@ PgpMimeDecrypt.prototype = {
     if (gDebugLogLevel > 4)
       DEBUG_LOG("mimeDecrypt.js: done: decrypted data='"+this.decryptedData+"'\n");
 
+    // ensure newline at the end of the stream
+    if (! this.decryptedData.endsWith("\n")) {
+      this.decryptedData +="\r\n";
+      this.dataLength += 2;
+    }
     gConv.setData(this.decryptedData, this.dataLength);
     this.mimeSvc.onDataAvailable(null, null, gConv, 0, this.dataLength);
 

Reply via email to