[balsa/wip/gmime3] sendmsg-window: Check when replying to a list
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gmime3] sendmsg-window: Check when replying to a list
- Date: Wed, 30 May 2018 19:07:22 +0000 (UTC)
commit b89ce1d78a3f2c3519e4ad37ca52a3cc98ba398e
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Tue May 29 19:08:41 2018 -0400
sendmsg-window: Check when replying to a list
* src/sendmsg-window.c (sendmsg_window_reply): If the message is
a reply to a mailing list, check that the message we are
replying to actually came from a mailing list; if not, return NULL.
ChangeLog | 7 +++++++
src/sendmsg-window.c | 9 +++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3b41d0243..91d06c48c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-05-29 Peter Bloomfield <pbloomfield bellsouth net>
+
+ * src/sendmsg-window.c (sendmsg_window_reply): If the message is
+ a reply to a mailing list, check that the message we are
+ replying to actually came from a mailing list; if not, return
+ NULL.
+
2018-05-29 Peter Bloomfield <pbloomfield bellsouth net>
* src/main-window.c (bw_enable_message_menus): Disable "reply to
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index e75364cdd..f3ec15292 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -6771,13 +6771,18 @@ sendmsg_window_reply(LibBalsaMailbox * mailbox, guint msgno,
{
LibBalsaMessage *message =
libbalsa_mailbox_get_message(mailbox, msgno);
- BalsaSendmsg *bsmsg = sendmsg_window_new();
+ BalsaSendmsg *bsmsg;
g_assert(message);
switch(reply_type) {
+ case SEND_REPLY_GROUP:
+ if (libbalsa_message_get_user_header(message, "list-post") == NULL) {
+ g_object_unref(message);
+ return NULL;
+ }
case SEND_REPLY:
case SEND_REPLY_ALL:
- case SEND_REPLY_GROUP:
+ bsmsg = sendmsg_window_new();
bsmsg->type = reply_type; break;
default: printf("reply_type: %d\n", reply_type); g_assert_not_reached();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]