[Commits] [SCM] claws branch, master, updated. 4.1.0-52-ge134be0de

mones at claws-mail.org mones at claws-mail.org
Thu Jul 28 15:56:12 UTC 2022


The branch, master has been updated
       via  e134be0de9ad9be730ab984a557991a8fae24970 (commit)
      from  be0f05095c9f5ea75cc6de3d341ffbaf37c2e103 (commit)

Summary of changes:
 src/customheader.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit e134be0de9ad9be730ab984a557991a8fae24970
Author: Ricardo Mones <ricardo at mones.org>
Date:   Thu Jul 28 17:54:43 2022 +0200

    Make custom headers compliant with RFC 2822 § 3.6
    
    And disallow setting header names with colons inside.

diff --git a/src/customheader.c b/src/customheader.c
index 6521a5c19..40e43e873 100644
--- a/src/customheader.c
+++ b/src/customheader.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2022 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * 
  */
 
 #ifdef HAVE_CONFIG_H
@@ -104,6 +103,9 @@ gboolean custom_header_is_allowed(const gchar *header)
 {
 	cm_return_val_if_fail(header != NULL, FALSE);
 
+	if (strchr(header, ':') != NULL)
+		return FALSE;
+
 	if (g_ascii_strcasecmp(header, "Date")         != 0 &&
 	    g_ascii_strcasecmp(header, "From")         != 0 &&
 	    g_ascii_strcasecmp(header, "To")           != 0 &&

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list