Bug 98463

Summary: Regression: Encryption doesn't happen if the encrypt button isn't pressed
Product: [Applications] kmail Reporter: Ingo Klöcker <kloecker>
Component: encryptionAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: grave    
Priority: NOR    
Version: 1.7.92   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ingo Klöcker 2005-02-03 01:47:58 UTC
Version:           1.7.92 (using KDE 3.3.2, compiled sources)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.111.30-default

How to reproduce:
- Send a message to a contact for which the encryption preferences is "Encrypt whenever possible". KMail will show the key confirmation dialog (or maybe not if you did disable this). But KMail won't encrypt the message unless you've explicitely enabled encryption via the toolbar button.

- Send a message to a contact for which you have a key but for which the encryption preferences are unset. KMail will ask you whether the message should be encrypted. Click Sign & Encrypt. Result: The message won't be encrypted.

Obviously this is a show stopper because it will lead to messages which were meant to be sent encrypted to be in fact sent unencrypted.
Comment 1 Ingo Klöcker 2005-02-05 22:12:34 UTC
CVS commit by kloecker: 

Fix the serious regression introduced by fixing aegypten issue 295.
BUG:98463


  M +2 -0      messagecomposer.cpp   1.43


--- kdepim/kmail/messagecomposer.cpp  #1.42:1.43
@@ -818,4 +818,5 @@ bool MessageComposer::determineWhetherTo
 
 void MessageComposer::markAllAttachmentsForSigning( bool sign ) {
+  mSignBody = sign;
   for ( QValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it )
     it->sign = sign;
@@ -823,4 +824,5 @@ void MessageComposer::markAllAttachments
 
 void MessageComposer::markAllAttachmentsForEncryption( bool enc ) {
+  mEncryptBody = enc;
   for ( QValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it )
     it->encrypt = enc;