summaryrefslogtreecommitdiff
path: root/imap/src/c-client
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2014-05-17 16:50:01 -0600
committerEduardo Chappa <chappa@washington.edu>2014-05-17 16:50:01 -0600
commit0b9aa5eb03014bb55211186ba0ce60b2a8986ba0 (patch)
tree0b5c4f9861aa883b0914c00385d8fd480c528044 /imap/src/c-client
parent223b392e8d40a0622936403d1da5eaf0cdd54d60 (diff)
downloadalpine-0b9aa5eb03014bb55211186ba0ce60b2a8986ba0.tar.xz
* New version 2.19.999
* Introduce the option "Validate Using Certificate Store Only", and make it the default. This will make Alpine check for the validity of signatures in certificates that a user has installed in their system, and not in the certificates that come with the message. A user can override this, although is not recommended, by disabling this feature. * When viewing a signed message, the ^E command would present an empty screen or Alpine would crash because when Alpine would get the PKCS7 body of the message from body->sparep, it would not decode it properly due to the new way in which the sparep pointer is encoded that was introduced in version 2.19.991. * When a signed message is forwarded, the message might not be filtered correctly, and mime information might make it into the body of the forwarded message. In order to produce this, the message must be forwarded from the index screen and not be opened. The reason why this makes a difference is because opening a signed message changes its body structure. The reason why a person could forward a message before reading it is because the person could already be aware of the content of the message (e.g. the message is in the sent-mail folder). * When a message fails to validate and the body is saved from the server for validation, be careful in the way that body part pointers are set, in order to do this we split the mail_body function into two parts, one that gets the body, the other that gets the section of the body. The new function that gets the section of the body (mail_body_section), is used to assign pointers of the reconstructed new body. * When a container has not been defined, transferring messages to a container will succeed, and the name of the container will be written on screen. * When Alpine is receiving the envelopes from an imap server, it attempts to generate the index line immediately; while doing so it might need to compute a score, and for this, it might need to go back and do some operation in the same imap server. In this case, Alpine will crash with a "lock when already locked" message. In order to avoid this crash, a new check in match_pattern was added to Alpine to avoid the second trip to a server that is busy sending us envelopes. Reported by Peter Koellner. * Update copyright notice in mswin.rc and pmapi.rc, as well as first time user notice and special request notice. * Alpine cannot handle correctly some characters in the Windows-1256 character set, which might lead to a crash or a corruption in the screen. Work was done to contain the bug. A more complete fix will be done in a future release. Reported by Professor Robert Funnell. * Decode the name of attachment names, so they can be written as part of the description of the part. * When transferring certificates to a local container, create container with default names PublicContainer, PrivateContainer and CAContainer, as appropriate for these files, unless the user has provided some other names.
Diffstat (limited to 'imap/src/c-client')
-rw-r--r--imap/src/c-client/mail.c33
-rw-r--r--imap/src/c-client/mail.h1
2 files changed, 25 insertions, 9 deletions
diff --git a/imap/src/c-client/mail.c b/imap/src/c-client/mail.c
index 871d07eb..03952d2e 100644
--- a/imap/src/c-client/mail.c
+++ b/imap/src/c-client/mail.c
@@ -2723,21 +2723,18 @@ void mail_gc_body (BODY *body)
if (body->mime.text.data) fs_give ((void **) &body->mime.text.data);
if (body->contents.text.data) fs_give ((void **) &body->contents.text.data);
}
-
-/* Mail get body part
- * Accepts: mail stream
- * message number
- * section specifier
- * Returns: pointer to body
+/* Mail get body section
+ * Accepts: body of message
+ * section specifier
+ * Returns: pointer to body at given section
*/
-BODY *mail_body (MAILSTREAM *stream,unsigned long msgno,unsigned char *section)
+BODY *mail_body_section (BODY *b, unsigned char *section)
{
- BODY *b = NIL;
PART *pt;
unsigned long i;
/* make sure have a body */
- if (section && *section && mail_fetchstructure (stream,msgno,&b) && b)
+ if (section && *section && b)
while (*section) { /* find desired section */
if (isdigit (*section)) { /* get section specifier */
/* make sure what follows is valid */
@@ -2768,6 +2765,24 @@ BODY *mail_body (MAILSTREAM *stream,unsigned long msgno,unsigned char *section)
else return NIL; /* unknown section specifier */
}
return b;
+}
+
+/* Mail get body part
+ * Accepts: mail stream
+ * message number
+ * section specifier
+ * Returns: pointer to body
+ */
+
+BODY *mail_body (MAILSTREAM *stream,unsigned long msgno,unsigned char *section)
+{
+ BODY *b = NIL;
+ PART *pt;
+ unsigned long i;
+ /* make sure have a body */
+ if (section && *section && mail_fetchstructure (stream,msgno,&b) && b)
+ return mail_body_section(b, section);
+ return b;
}
/* Mail output date from elt fields
diff --git a/imap/src/c-client/mail.h b/imap/src/c-client/mail.h
index fe7eaa77..2accc85b 100644
--- a/imap/src/c-client/mail.h
+++ b/imap/src/c-client/mail.h
@@ -1704,6 +1704,7 @@ void mail_gc (MAILSTREAM *stream,long gcflags);
void mail_gc_msg (MESSAGE *msg,long gcflags);
void mail_gc_body (BODY *body);
+BODY *mail_body_section (BODY *b, unsigned char *section);
BODY *mail_body (MAILSTREAM *stream,unsigned long msgno,
unsigned char *section);
char *mail_date (char *string,MESSAGECACHE *elt);