[issue228] KMail composer: disabling signing for an attachment leads to no body sent

David Faure <[email protected]>
Newsgroups gmane.comp.encryption.gpg.gpa.devel
Message-ID <[email protected]>
New submission from David Faure <[email protected]>:

In KMail, compose a new mail, and 
* choose OpenPGP/MIME  
* activate signing in the toolbar 
* write some text in the body 
* add an attachment 
* disable signing for that attachment 
* send the mail (to yourself) 
 
The resulting mail has no body at all, only the attachment. 
 
The difference with the normal case is: 
mEarlyAddAttachments=false and mAllAttachmentsAreInBody=false 
(they are true when signing the attachment) 
 
Hmm, not sure if related, but the code basically does 
  if ( mEarlyAddAttachments ) { 
     ... 
  } else { // !earlyAddAttachments 
    // the signed body must not be 8bit encoded 
    mOldBodyPart.setBodyAndGuessCte(body, allowedCTEs, ..., doSign); 
  } 
  // create S/MIME body part for signing and/or encrypting 
  mOldBodyPart.setBodyEncoded( body ); 
 
Doesn't the last line invalidate the contents of the "else"? 
 
Anyway the problem is later, since mEncodedBody is OK. 
 
Further investigation shows that 
the && ( !mEarlyAddAttachments || !mAllAttachmentsAreInBody ) 
in MessageComposer::addBodyAndAttachments() is the first problem (those are 
false, but there *is* an attachment in this mail, so we need to go in the first 
part of this if() AFAICS). But even commenting that out doesn't help, still no 
body in the resulting mail. The Dw* stuff totally escapes me so I'm stopping 
there...

----------
assignedto: marc
messages: 1145
nosy: david, marc
priority: bug
status: unread
title: KMail composer: disabling signing for an attachment leads to no body sent
topic: KMail
______________________________________________________
Aegypten issue tracker <[email protected]>
<https://intevation.de/roundup/aegypten/issue228>
______________________________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.