filter: require an extra "+" before data

This disambiguates it from control commands
This commit is contained in:
Ed Kellett 2019-04-03 12:16:44 +01:00
parent 8692240f51
commit dc141aad45
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC

View file

@ -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);