diff options
author | Eduardo Chappa <chappa@washington.edu> | 2014-05-31 21:37:10 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2014-05-31 21:37:10 -0600 |
commit | 60b67de2ba4be4d2bfeeeea685869e9a5a7363c0 (patch) | |
tree | 20831a8341dfe86c0f4c247df9ac5b5ec61b41db /pith/reply.c | |
parent | d8f387ef722cfb9e694d25c1ab182d01501f1b9d (diff) | |
download | alpine-60b67de2ba4be4d2bfeeeea685869e9a5a7363c0.tar.xz |
* new version 2.19.9991
* S/MIME Alpine would compute incorrectly the signature of a message
that contains 8bit if the option "Enable 8bit ESMTP Negotiation" is
enabled, the message contains 8bit characters and the smtp server
supports 8bit sending.
* Crash while redrawing S/MIME configuration screen when importing a
certificate
* When forwarding a message before opening it, the message might not be
found. The problem is in the forward_body function, where the section
of the body is not correctly set in all instances.
* When forwarding a signed message Alpine might forward the message as
a multipart message, instead of just selecting the body of the
message. Change to forward the signed part only. This aligns Alpine
with what it does when it replies to a similar message.
Diffstat (limited to 'pith/reply.c')
-rw-r--r-- | pith/reply.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/pith/reply.c b/pith/reply.c index 60a7c489..2a8ab158 100644 --- a/pith/reply.c +++ b/pith/reply.c @@ -4,8 +4,8 @@ static char rcsid[] = "$Id: reply.c 1074 2008-06-04 00:08:43Z hubert@u.washingto /* * ======================================================================== - * Copyright 2006-2008 University of Washington * Copyright 2013-2014 Eduardo Chappa + * Copyright 2006-2008 University of Washington * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,6 +46,9 @@ static char rcsid[] = "$Id: reply.c 1074 2008-06-04 00:08:43Z hubert@u.washingto #include "../pith/ablookup.h" #include "../pith/mailcmd.h" #include "../pith/margin.h" +#ifdef SMIME +#include "../pith/smime.h" +#endif /* SMIME */ /* @@ -2249,11 +2252,23 @@ forward_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_bod } } else if(orig_body->type == TYPEMULTIPART) { - if(orig_body->subtype && !strucmp(orig_body->subtype, "signed") - && orig_body->nested.part){ + if(orig_body->subtype + && ((!strucmp(orig_body->subtype, "signed") && orig_body->nested.part) +#ifdef SMIME + || (!strucmp(orig_body->subtype, "mixed") + && orig_body->nested.part + && orig_body->nested.part->body.type == TYPEMULTIPART + && orig_body->nested.part->body.subtype + && (!strucmp(orig_body->nested.part->body.subtype, OUR_PKCS7_ENCLOSURE_SUBTYPE) + || !strucmp(orig_body->nested.part->body.subtype, "signed"))) + || !strucmp(orig_body->subtype, OUR_PKCS7_ENCLOSURE_SUBTYPE)) +#endif /* SMIME */ + ){ /* only operate on the signed data (not the signature) */ body = forward_body(stream, env, &orig_body->nested.part->body, - msgno, section, msgtext, flags); + msgno, + orig_body->nested.part->body.type == TYPEMULTIPART + ? section : sect_prefix, msgtext, flags); } /*---- Message is multipart ----*/ else if(!(orig_body->subtype && !strucmp(orig_body->subtype, |