Project

General

Profile

« Previous | Next » 

Revision ebccdcc4

Added by Marc Dequènes about 15 years ago

  • ID ebccdcc4f5fdcb1309e648f8db5260a729afcdbd

[fix] corrected mistakes introduced in the 4 previous blind commits

View differences:

lib/cyborghood/mail.rb
class Mail < Delegator
include ActionMailer::Quoting
include ActionMailer::Utils
include GetText
MAX_DRIFT_TIME = 600
attr_accessor :user
attr_accessor :user, :signature_timestamp
def initialize(msg = nil)
@config = Config.instance
......
if msg.nil?
@mail = TMail::Mail.new
set_custom_headers
elsif msg.is_a? TMail::Mail
@mail = msg
else
# unquote headers and transform into TMail object
@mail = TMail::Mail.parse(TMail::Unquoter.unquote_and_convert_to(msg, "UTF-8"))
......
def create_simple_reject_reply(msg)
reply = create_reply()
reply.set_content_type("text", "plain", {'charset' => "utf-8"})
relay.set_disposition("inline")
reply.set_disposition("inline")
reply.quoted_printable_body = msg
reply.sign
reply.crypt(reply.user.keyFingerPrint) unless reply.user.nil?
......
end
logger.debug "Mail OK"
mark_processed(sig_check.timestamp)
mark_processed(self.signature_timestamp)
order = Order.new(true)
order.user = self.user
......
# create a fake mail and chain parsing operations
plain_mail = self.class.new(signed_content)
plain_mail.user = self.user
plain_mail.signature_timestamp = sig_check.timestamp
# propagate message_id to be able to mark messages (replay protection)
plein_mail.message_id = @mail.message_id
plain_mail.message_id = @mail.message_id
return plain_mail.parse
end

Also available in: Unified diff