[Commits] [SCM] claws branch, master, updated. 4.1.0-53-g0cc7a4961
paul at claws-mail.org
paul at claws-mail.org
Thu Jul 28 17:13:40 UTC 2022
The branch, master has been updated
via 0cc7a49610f6c94211e1f46c347253ef570df43c (commit)
from e134be0de9ad9be730ab984a557991a8fae24970 (commit)
Summary of changes:
src/customheader.c | 3 ---
src/prefs_customheader.c | 7 ++++++-
2 files changed, 6 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 0cc7a49610f6c94211e1f46c347253ef570df43c
Author: Paul <paul at claws-mail.org>
Date: Thu Jul 28 18:13:35 2022 +0100
give an appropriate error msg when disallowing a colon in a custom header
diff --git a/src/customheader.c b/src/customheader.c
index 40e43e873..b961b7107 100644
--- a/src/customheader.c
+++ b/src/customheader.c
@@ -103,9 +103,6 @@ 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 &&
diff --git a/src/prefs_customheader.c b/src/prefs_customheader.c
index bdcde7332..c264d7843 100644
--- a/src/prefs_customheader.c
+++ b/src/prefs_customheader.c
@@ -499,7 +499,12 @@ static void prefs_custom_header_list_view_set_row(PrefsAccount *ac)
(*entry_text == '\n' || *entry_text == '\r' ||
*entry_text == '\t' || *entry_text == ' '))
entry_text++;
-
+
+ if (strchr(entry_text, ':') != NULL) {
+ alertpanel_error(_("A colon (:) is not allowed in a custom header."));
+ return;
+ }
+
if (!custom_header_is_allowed(entry_text)) {
alertpanel_error(_("This Header name is not allowed as a custom header."));
return;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list