aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-24 14:34:09 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-24 14:34:09 +0000
commit13b128038a84c8a90bd17dd47d73c27b1b9d7e49 (patch)
treea5c14f3f3e7a4575af2c50e0cc637e5f582525f5 /src/plugins
parentd7f2ae66c4598624ffec2713327749cd0760c206 (diff)
downloadrspamd-13b128038a84c8a90bd17dd47d73c27b1b9d7e49.tar.gz
rspamd-13b128038a84c8a90bd17dd47d73c27b1b9d7e49.zip
Fix DKIM verification for empty DKIM signatures
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dkim_check.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c
index 8147eb270..7852ddd6c 100644
--- a/src/plugins/dkim_check.c
+++ b/src/plugins/dkim_check.c
@@ -577,6 +577,13 @@ dkim_symbol_callback (struct rspamd_task *task, void *unused)
while (hlist != NULL) {
rh = (struct raw_header *)hlist->data;
+ if (rh->decoded == NULL || rh->decoded[0] == '\0') {
+ msg_info_task ("<%s> cannot load empty DKIM context",
+ task->message_id);
+ hlist = g_list_next (hlist);
+ continue;
+ }
+
if (res == NULL) {
res = rspamd_mempool_alloc0 (task->task_pool, sizeof (*res));
res->prev = res;
@@ -599,8 +606,8 @@ dkim_symbol_callback (struct rspamd_task *task, void *unused)
&err);
if (ctx == NULL) {
if (err != NULL) {
- msg_info_task ("<%s> cannot parse DKIM context: %s",
- task->message_id, err->message);
+ msg_info_task ("<%s> cannot parse DKIM context: %e",
+ task->message_id, err);
g_error_free (err);
err = NULL;
}