From c3889c74a06442e3bfce26a74bd269a1e42a4b32 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 16 Oct 2015 15:13:35 +0100 Subject: [PATCH] Remove quotes in HTTP query values --- src/libutil/http.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- 2.39.5