Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Michael Stapelberg <michael+sup@stapelberg.de>
To: sup-devel <sup-devel@rubyforge.org>
Subject: [sup-devel] [PATCH] Bugfix: Make sure to use UNIX line-endings for GPG decrypted payloads
Date: Mon, 19 Jul 2010 21:39:31 +0200	[thread overview]
Message-ID: <1279568308-sup-1044@midna.zekjur.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

Hi,

please find attached a patch for the following issue (quuote from the commit
message):

	Bugfix: Make sure to use UNIX line-endings for GPG decrypted payloads

	Otherwise, RMail will fail to correctly parse multipart/signed messages

Best regards,
Michael

[-- Attachment #2: 0001-Bugfix-Make-sure-to-use-UNIX-line-endings-for-GPG-de.patch --]
[-- Type: application/octet-stream, Size: 891 bytes --]

From 157d0f0d3ff98b7b5841813b712dbd70c92d9732 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Mon, 19 Jul 2010 21:37:36 +0200
Subject: [PATCH] Bugfix: Make sure to use UNIX line-endings for GPG decrypted payloads

Otherwise, RMail will fail to correctly parse multipart/signed messages
---
 lib/sup/crypto.rb |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
index 289fb0e..d381fa7 100644
--- a/lib/sup/crypto.rb
+++ b/lib/sup/crypto.rb
@@ -152,6 +152,8 @@ EOS
     end
 
     output = IO.read output_fn.path
+    ## make sure to use UNIX line-endings (payloads may contain \r\n)
+    output = output.gsub("\r\n", "\n")
     output.force_encoding Encoding::ASCII_8BIT if output.respond_to? :force_encoding
 
     ## check for a valid signature in an extra run because gpg aborts if the
-- 
1.6.5


[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

             reply	other threads:[~2010-07-19 20:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-19 19:39 Michael Stapelberg [this message]
2010-07-19 22:57 ` Michael Stapelberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1279568308-sup-1044@midna.zekjur.net \
    --to=michael+sup@stapelberg.de \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox