Project

General

Profile

« Previous | Next » 

Revision 91d7d237

Added by Marc Dequènes almost 14 years ago

  • ID 91d7d2372fb59a871e2044b768b3288fa6038199

[fix] Mail: don't forget to reverse-propagate the user into the original mail object when decrypting

View differences:

lib/cyborghood/mail.rb
clear_mail.user = @user
# propagate message_id to be able to mark messages (replay protection)
clear_mail.message_id = @mail.message_id
return clear_mail.process
decrypted_mail = clear_mail.process
# reverse propagate user information (convenience)
@user = decrypted_mail.user
return decrypted_mail
rescue GPGME::Error, NotImplementedError => e
raise CyberError.new(:unrecoverable, "protocol/mail", e.message)
end

Also available in: Unified diff