summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2019-04-08 07:44:46 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2019-04-08 07:44:46 +0000
commitd9cf5838e40637f65547f6cad444bfe9c6d3084f (patch)
treee4a9dff4c7ba96e622482249a1fbc1c2c859e9c1 /usr.sbin/smtpd
parentce138783e80cab520f32337af7c22c43540e8ff9 (diff)
fix parsing of datalines before passing them to filters, the | splitting is
done a bit too early diff from Martijn van Duren <openbsd+tech@list.imperialat.at>
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/lka_filter.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c
index a10d9cbe72f..8d957020b86 100644
--- a/usr.sbin/smtpd/lka_filter.c
+++ b/usr.sbin/smtpd/lka_filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka_filter.c,v 1.34 2019/01/15 04:49:50 sunil Exp $ */
+/* $OpenBSD: lka_filter.c,v 1.35 2019/04/08 07:44:45 gilles Exp $ */
/*
* Copyright (c) 2018 Gilles Chehade <gilles@poolp.org>
@@ -458,16 +458,17 @@ lka_filter_process_response(const char *name, const char *line)
return 0;
response = ep+1;
- if ((ep = strchr(response, '|'))) {
- parameter = ep + 1;
- *ep = 0;
- }
if (strcmp(kind, "filter-dataline") == 0) {
filter_data_next(token, reqid, response);
return 1;
}
+ if ((ep = strchr(response, '|'))) {
+ parameter = ep + 1;
+ *ep = 0;
+ }
+
if (strcmp(response, "proceed") != 0 &&
strcmp(response, "reject") != 0 &&
strcmp(response, "disconnect") != 0 &&