summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-12-16 13:42:37 -0700
committerEduardo Chappa <chappa@washington.edu>2018-12-16 13:42:37 -0700
commitea4d5cd8e41c3241d8bebe4f7bbb2b7603e05283 (patch)
tree79b212bcf956fd6c54e1f4f0cbee9cdbe1d1d2f5 /pith
parentc7e14ba2c2ac2a858539dcb4f077d8fb03988c06 (diff)
downloadalpine-ea4d5cd8e41c3241d8bebe4f7bbb2b7603e05283.tar.xz
* Bug: When a message is multipart, and the first part is flowed text,
then forwarding the message will set the first part to be flowed, and sent that way even when the option Do Not Send Flowed Text is enabled. To avoid this issue, we remove any flowed text parameters from the body of the message, so we create a "remove_parameter" function, and then we set the flowed parameter only when the user requested. Reported by Holger Trapp.
Diffstat (limited to 'pith')
-rw-r--r--pith/pine.hlp7
-rw-r--r--pith/send.c25
-rw-r--r--pith/send.h1
3 files changed, 32 insertions, 1 deletions
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 63bc8d30..1b6afe20 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 312 2018-12-08 18:58:41
+Alpine Commit 315 2018-12-16 13:42:34
============= h_news =================
<HTML>
<HEAD>
@@ -248,6 +248,11 @@ Bugs that have been addressed include:
not exist is the more complex code that Unix-Pico has with color
codes for specific colors.)
+ <LI> When a message is multipart, and the first part is flowed text,
+ then forwarding the message will set the first part to be flowed,
+ and sent that way even when the option Do Not Send Flowed Text is
+ enabled. Reported by Holger Trapp.
+
<LI> Update build.bat file to add /DWINVER=0x0501 so that Alpine can
build when using Visual Studio 2017. Fix contributed by
Ulf-Dietrich Braunmann.
diff --git a/pith/send.c b/pith/send.c
index dc5a500f..aea9c214 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -4120,6 +4120,31 @@ most_preferred_charset(unsigned long validbitmap)
return(charsetlist[index]);
}
+void
+remove_parameter(PARAMETER **param, char *paramname)
+{
+ PARAMETER *pm;
+
+ if(param == NULL || *param == NULL
+ || paramname == NULL || *paramname == '\0')
+ return;
+
+ for(pm = *param;
+ pm != NULL && pm->attribute != NULL && strucmp(pm->attribute, paramname);
+ pm = pm->next);
+
+ if(pm){
+ PARAMETER om, *qm;
+ om.next = *param;
+ for(qm = &om; qm->next != pm; qm = qm->next);
+ qm->next = pm->next;
+ pm->next = NULL;
+ mail_free_body_parameter(&pm);
+ if(*param == NULL)
+ mail_free_body_parameter(param);
+ }
+}
+
/*
* Set parameter to new value.
diff --git a/pith/send.h b/pith/send.h
index ef06c408..fe02d5bc 100644
--- a/pith/send.h
+++ b/pith/send.h
@@ -238,6 +238,7 @@ BODY *first_text_8bit(BODY *);
ADDRESS *generate_from(void);
void set_mime_type_by_grope(BODY *);
void set_charset_possibly_to_ascii(BODY *, char *);
+void remove_parameter(PARAMETER **param, char *);
void set_parameter(PARAMETER **, char *, char *);
void pine_encode_body(BODY *);
int pine_header_line(char *, METAENV *, char *, soutr_t, TCPSTREAM *, int, int);