aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-08-18 15:24:47 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-08-18 15:24:47 +0100
commit87be6ee96d2850a54d5d2a7dcf2b107e9d9f06af (patch)
tree22a7f84ba475506bdffc35646041416c4f4f2e9e /src/plugins/regexp.c
parent4b0b45c29baba61e43a546446be30a0ccdc1075f (diff)
downloadrspamd-87be6ee96d2850a54d5d2a7dcf2b107e9d9f06af.tar.gz
rspamd-87be6ee96d2850a54d5d2a7dcf2b107e9d9f06af.zip
Fix critical bug in host/port parsing.
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r--src/plugins/regexp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index 2bb7ebada..3bab09f20 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -1723,8 +1723,8 @@ static gboolean
rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused)
{
struct expression_argument *arg;
- GList *cur, *rcpt_list = NULL;
- gchar *type, *what = NULL;
+ InternetAddressList *ia;
+ const gchar *type, *what = NULL;
if (args == NULL) {
msg_warn ("no parameters to function");
@@ -1743,7 +1743,7 @@ rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused)
case 'f':
case 'F':
if (g_ascii_strcasecmp (type, "from") == 0) {
- what = task->from;
+ what = rspamd_task_get_sender (task);
}
else {
msg_warn ("bad argument to function: %s", type);
@@ -1783,7 +1783,7 @@ rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused)
case 'r':
case 'R':
if (g_ascii_strcasecmp (type, "rcpt") == 0) {
- rcpt_list = task->rcpt;
+ ia = task->rcpt_mime;
}
else {
msg_warn ("bad argument to function: %s", type);
@@ -1796,7 +1796,7 @@ rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused)
}
}
- if (what == NULL && rcpt_list == NULL) {
+ if (what == NULL && ia == NULL) {
/* Not enough data so regexp would NOT be found anyway */
return FALSE;
}