From dc141aad45d2a025b85db002aac47404e6ab6474 Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Wed, 3 Apr 2019 12:16:44 +0100 Subject: [PATCH] filter: require an extra "+" before data This disambiguates it from control commands --- extensions/filter.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extensions/filter.c b/extensions/filter.c index 1cb27829..cf7907c2 100644 --- a/extensions/filter.c +++ b/extensions/filter.c @@ -196,6 +196,13 @@ setfilter(const char *check, const char *data, const char **error) return 0; } + if (*data != '+') { + if (error) *error = "unknown command or data doesn't start with +"; + return -1; + } + + data += 1; + if (state == FILTER_FILLING) { int dl; unsigned char *d = rb_base64_decode(data, strlen(data), &dl);