diff options
author | 2019-04-08 07:44:45 +0000 | |
---|---|---|
committer | 2019-04-08 07:44:45 +0000 | |
commit | 02db46c18c4b9a2112e538e6cb0528eb44a5e681 (patch) | |
tree | f8a78006c7b3668304a96db09f8a5f99b6d526a1 | |
parent | Current window style also needs to be tested for default. (diff) | |
download | wireguard-openbsd-02db46c18c4b9a2112e538e6cb0528eb44a5e681.tar.xz wireguard-openbsd-02db46c18c4b9a2112e538e6cb0528eb44a5e681.zip |
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>
-rw-r--r-- | usr.sbin/smtpd/lka_filter.c | 11 |
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 && |