From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.87.14 with SMTP id k14cs1407135agb; Sat, 2 Jan 2010 08:46:27 -0800 (PST) Received: by 10.224.52.81 with SMTP id h17mr10283037qag.131.1262450786900; Sat, 02 Jan 2010 08:46:26 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 37si27690809qyk.20.2010.01.02.08.46.26; Sat, 02 Jan 2010 08:46:26 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 343C018582CB; Sat, 2 Jan 2010 11:46:26 -0500 (EST) Received: from magnesium.club.cc.cmu.edu (MAGNESIUM.CLUB.CC.cmu.edu [128.237.157.15]) by rubyforge.org (Postfix) with ESMTP id 55E6F15B802F for ; Sat, 2 Jan 2010 11:42:16 -0500 (EST) Received: (qmail 18296 invoked from network); 2 Jan 2010 16:42:15 -0000 Received: from pion.club.cc.cmu.edu (HELO localhost.localdomain) (128.237.157.88) by magnesium.club.cc.cmu.edu with SMTP; 2 Jan 2010 16:42:15 -0000 From: Rich Lane To: sup-devel@rubyforge.org Date: Sat, 2 Jan 2010 08:42:15 -0800 Message-Id: <1262450535-5439-1-git-send-email-rlane@club.cc.cmu.edu> X-Mailer: git-send-email 1.6.3.3 Subject: [sup-devel] [PATCH] force binary encoding before parsing decrypted messages X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org --- 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 fb2661a..91652c7 100644 --- a/lib/sup/crypto.rb +++ b/lib/sup/crypto.rb @@ -130,6 +130,7 @@ class CryptoManager end output = IO.read output_fn.path + output.force_encoding Encoding::ASCII_8BIT if output.respond_to? :force_encoding ## there's probably a better way to do this, but we're using the output to ## look for a valid signature being present. @@ -157,6 +158,7 @@ class CryptoManager msg = RMail::Parser.read output if msg.header.content_type =~ %r{^multipart/} && !msg.multipart? output = "MIME-Version: 1.0\n" + output + output.force_encoding Encoding::ASCII_8BIT if output.respond_to? :force_encoding msg = RMail::Parser.read output end notice = Chunk::CryptoNotice.new :valid, "This message has been decrypted for display" -- 1.6.3.3 _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel