From: Vsevolod Stakhov Date: Fri, 16 Oct 2015 14:13:35 +0000 (+0100) Subject: Remove quotes in HTTP query values X-Git-Tag: 1.0.7~78 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c3889c74a06442e3bfce26a74bd269a1e42a4b32;p=rspamd.git Remove quotes in HTTP query values --- diff --git a/src/libutil/http.c b/src/libutil/http.c index 72134e22d..f6f08e376 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -2466,6 +2466,15 @@ rspamd_http_message_parse_query (struct rspamd_http_message *msg) value_tok->len = rspamd_decode_url (value->str, value->str, value->len); + /* Detect quotes for value */ + if (value_tok->begin[0] == '"') { + memmove (value->str, value->str + 1, + value_tok->len - 1); + value_tok->len --; + } + if (value_tok->begin[value_tok->len - 1] == '"') { + value_tok->len --; + } } else { value = rspamd_fstring_new_init ("", 0);